From 4b867a975393e7b4d3123db283c8027b4e2236d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aykut=20Karda=C5=9F?= Date: Sat, 6 Nov 2021 11:48:16 +0300 Subject: [PATCH] Write tests of trim utils --- test/utils/index.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 test/utils/index.ts diff --git a/test/utils/index.ts b/test/utils/index.ts new file mode 100644 index 0000000000..84a54d039f --- /dev/null +++ b/test/utils/index.ts @@ -0,0 +1,16 @@ +import * as assert from 'assert'; +import { trim_start, trim_end } from '../../src/compiler/utils/trim'; + +describe('utils', () => { + describe('trim', () => { + it('trim_start', () => { + const value = trim_start(' content'); + assert.equal(value, 'content'); + }); + + it('trim_end', () => { + const value = trim_end('content '); + assert.equal(value, 'content'); + }); + }); +});