BREAKING CHANGE(scope): switch to new @pushrocks scope

This commit is contained in:
2018-08-27 23:55:14 +02:00
parent c5ec7e9c24
commit a3f18c17ed
17 changed files with 1740 additions and 1405 deletions

View File

@ -1,37 +1,37 @@
import { expect, tap } from 'tapbundle'
import * as path from 'path'
import { expect, tap } from '@pushrocks/tapbundle';
import * as path from 'path';
import * as smartscaf from '../ts/index'
import * as smartscaf from '../ts/index';
// process.env.CI = 'true'
process.env.CI = 'true'
let testScafTemplate: smartscaf.ScafTemplate
let testScafTemplate: smartscaf.ScafTemplate;
tap.test('should create new Smartscaf instance', async () => {
testScafTemplate = new smartscaf.ScafTemplate()
expect(testScafTemplate).to.be.instanceof(smartscaf.ScafTemplate)
})
testScafTemplate = new smartscaf.ScafTemplate();
expect(testScafTemplate).to.be.instanceof(smartscaf.ScafTemplate);
});
tap.test('Smartscaf instance -> should read a template directory', async () => {
await testScafTemplate.readTemplateFromDir('./test/test_template')
expect(testScafTemplate.templateSmartfileArray.length).to.equal(5)
})
await testScafTemplate.readTemplateFromDir('./test/test_template');
expect(testScafTemplate.templateSmartfileArray.length).to.equal(5);
});
tap.test('smartfile -> should accept variables', async () => {
await testScafTemplate.supplyVariables({})
console.log(testScafTemplate.missingVariables)
})
await testScafTemplate.supplyVariables({});
console.log(testScafTemplate.missingVariables);
});
tap.test('ask cli', async () => {
await testScafTemplate.askCliForMissingVariables()
})
await testScafTemplate.askCliForMissingVariables();
});
tap.test('should have valid supplied variables', async () => {
console.log(testScafTemplate.suppliedVariables)
})
console.log(testScafTemplate.suppliedVariables);
});
tap.test('should output ready rendered template', async () => {
await testScafTemplate.writeToDisk(path.resolve('./test/test_output'))
})
await testScafTemplate.writeToDisk(path.resolve('./test/test_output'));
});
tap.start()
tap.start();