Skip to content

Commit cab0352

Browse files
committed
[test] add removeAtag util test.
1 parent af41e01 commit cab0352

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/unit/util.test.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
require = require('esm')(
33
module /* , options */
44
); /* eslint-disable-line no-global-assign */
5-
const { expect } = require('chai');
65
const { resolvePath } = require('../../src/core/router/util');
6+
const { removeAtag } = require('../../src/core/render/utils');
7+
const { expect } = require('chai');
78

89
describe('router/util', function() {
910
it('resolvePath', async function() {
@@ -30,3 +31,13 @@ describe('router/util', function() {
3031
expect(result).equal('/hello.md');
3132
});
3233
});
34+
35+
describe('render/utils/removeAtag', function() {
36+
it('remove A tag', async function() {
37+
// WHEN
38+
const result = removeAtag('<a href="http://url">content</a>');
39+
40+
// THEN
41+
expect(result).equal('content');
42+
});
43+
});

0 commit comments

Comments
 (0)