BREAKING CHANGE(core): switch to esm
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user