Skip to content

Instantly share code, notes, and snippets.

@anvilation
Created May 25, 2021 00:44
Show Gist options
  • Save anvilation/48ee603f893f48da1be73d1cadad0295 to your computer and use it in GitHub Desktop.
Save anvilation/48ee603f893f48da1be73d1cadad0295 to your computer and use it in GitHub Desktop.
Smart UI CI / CD - Re-written Test Spect
const path = require('path');
const assert = require('yeoman-assert');
const helpers = require('yeoman-test');
const os = require('os');
describe('csui-extension generator', function () {
this.timeout(0);
let options = {
skipInstall: true,
}
describe('generate a prototype project', function () {
it('Should Create Smart UI Module structure', function () {
return helpers.run(require.resolve('../app/index.js'))
.inDir(path.join(os.tmpdir(), './generator-csui-extension-test'))
.withOptions(options)
.withPrompts({
"projectName": "driverlane",
"projectDescription": "driverlane e2e test module",
"modulePrefix": "drive"
})
.toPromise()
.then(() => {
assert.file([
'package.json',
'.jshintrc',
'.jshintrc-html',
'.eslintrc',
'.csslintrc',
'.csslintrc-output',
'Gruntfile.js',
'README.md',
'config-editor.js',
'server.js'
]);
assert.file([
'src/Gruntfile.js',
'src/config-build.js',
'src/component.js'
]);
assert.file([
'test/Gruntfile.js',
'test/test-common.js',
'test/test-debug.js',
'test/test-release.js',
'test/karma.common.js',
'test/karma.debug.js',
'test/karma.release.js'
]);
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment