BREAKING CHANGE(core): switch to esm

This commit is contained in:
2022-06-25 03:19:16 +02:00
parent d33f943fc6
commit 5f1bc8dc29
17 changed files with 11191 additions and 1041 deletions

View File

@ -1,7 +1,7 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as path from 'path';
import * as smartscaf from '../ts/index';
import * as smartscaf from '../ts/index.js';
process.env.CI = 'true';
@ -9,12 +9,12 @@ let testScafTemplate: smartscaf.ScafTemplate;
tap.test('should create new Smartscaf instance', async () => {
testScafTemplate = new smartscaf.ScafTemplate('./test/test_template');
expect(testScafTemplate).to.be.instanceof(smartscaf.ScafTemplate);
expect(testScafTemplate).toBeInstanceOf(smartscaf.ScafTemplate);
});
tap.test('Smartscaf instance -> should read a template directory', async () => {
await testScafTemplate.readTemplateFromDir();
expect(testScafTemplate.templateSmartfileArray.length).to.equal(6);
expect(testScafTemplate.templateSmartfileArray.length).toEqual(6);
});
tap.test('smartfile -> should accept variables', async () => {