Skip to content

Commit 4b867a9

Browse files
committed
Write tests of trim utils
1 parent 5815b2b commit 4b867a9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/utils/index.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import * as assert from 'assert';
2+
import { trim_start, trim_end } from '../../src/compiler/utils/trim';
3+
4+
describe('utils', () => {
5+
describe('trim', () => {
6+
it('trim_start', () => {
7+
const value = trim_start(' content');
8+
assert.equal(value, 'content');
9+
});
10+
11+
it('trim_end', () => {
12+
const value = trim_end('content ');
13+
assert.equal(value, 'content');
14+
});
15+
});
16+
});

0 commit comments

Comments
 (0)