BREAKING CHANGE(structure): templates now take their path within the constructor

This commit is contained in:
2018-08-30 22:43:22 +02:00
parent 6cb4fff0a5
commit 53de92ac1a
2 changed files with 23 additions and 11 deletions

View File

@ -8,12 +8,12 @@ process.env.CI = 'true'
let testScafTemplate: smartscaf.ScafTemplate;
tap.test('should create new Smartscaf instance', async () => {
testScafTemplate = new smartscaf.ScafTemplate();
testScafTemplate = new smartscaf.ScafTemplate('./test/test_template');
expect(testScafTemplate).to.be.instanceof(smartscaf.ScafTemplate);
});
tap.test('Smartscaf instance -> should read a template directory', async () => {
await testScafTemplate.readTemplateFromDir('./test/test_template');
await testScafTemplate.readTemplateFromDir();
expect(testScafTemplate.templateSmartfileArray.length).to.equal(5);
});