Skip to content

Commit

Permalink
feat: 修改单元测试
Browse files Browse the repository at this point in the history
  • Loading branch information
strick committed Jan 18, 2023
1 parent 495f8e9 commit 851b603
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: strick
* @LastEditors: strick
* @Date: 2023-01-12 10:17:17
* @LastEditTime: 2023-01-15 20:59:32
* @LastEditTime: 2023-01-18 17:25:25
* @Description:
* @FilePath: /web/shin-monitor/test/test.js
*/
Expand Down
9 changes: 8 additions & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: strick
* @LastEditors: strick
* @Date: 2023-01-12 11:38:07
* @LastEditTime: 2023-01-12 15:17:58
* @LastEditTime: 2023-01-18 17:30:37
* @Description:
* @FilePath: /web/shin-monitor/test/utils.js
*/
Expand Down Expand Up @@ -50,4 +50,11 @@ describe('assign', function() {
expect(Object.assign({a: 1}, {a: 2})).to.eql({ a: 2});
expect(Object.assign({a: { c: 2 }}, {a: { c: 1}})).to.eql({ a: { c: 1}});
});
});
describe('removeQuote', function() {
it('html', function() {
expect(utils.removeQuote('<a href="">')).to.be.equal('<a href=>');
expect(utils.removeQuote('<a href="1">')).to.be.equal('<a href=1>');
expect(utils.removeQuote('<a href=""></a><div class=""></div>')).to.be.equal('<a href=></a><div class=></div>');
});
});

0 comments on commit 851b603

Please sign in to comment.