BREAKING CHANGE(core): switch to esm

This commit is contained in:
2022-08-07 16:45:38 +02:00
parent 1d6cc3833d
commit 084954b210
9 changed files with 11191 additions and 8706 deletions

View File

@ -1,20 +1,20 @@
import { tap, expect } from '@pushrocks/tapbundle';
import * as tlt from '../ts/index';
import * as tlt from '../ts/index.js';
let testMustache: tlt.SmartMustache;
tap.test('should create a valid instance of tlt', async () => {
testMustache = new tlt.SmartMustache(
'some awesome {{customString}} that is {{license}} licensed'
);
expect(testMustache).to.be.instanceOf(tlt.SmartMustache);
expect(testMustache).toBeInstanceOf(tlt.SmartMustache);
});
tap.test('should output a valid string with some data', async () => {
let appliedString = testMustache.applyData({
customString: 'horse',
license: 'MIT',
});
expect(appliedString).to.equal('some awesome horse that is MIT licensed');
expect(appliedString).toEqual('some awesome horse that is MIT licensed');
});
tap.start();