Commit a361f4c3 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[FEATURE] add test cases for extbase extension

parent f326b91a
{
"css": "css",
"sass": "sass",
"javascript": "js",
"compassConfig": ".",
"images": "imgs"
}
/*global describe, beforeEach, it */
'use strict';
var path = require('path'),
assert = assert = require('yeoman-generator').assert,
helpers = require('yeoman-generator').test,
os = require('os'),
fs = require('fs');
describe('sgalinski generator:extbase-extension', function() {
before(function(done) {
helpers.run(path.join(__dirname, '../app'))
.inDir(path.join(os.tmpdir(), './temp-test'))
.withOptions({ 'skip-install': true })
.withPrompt({
projectType: 'extbaseExtension',
projectName: 'test',
cssPath: 'css',
sassPath: 'sass',
javascriptPath: 'js',
compassConfigPath: '.',
imagesPath: 'imgs'
})
.on('end', done);
});
it('creates config files', function() {
assert.file([
'bower.json',
'config.rb',
'.editorconfig',
'.jshintrc',
'asset-paths.json'
]);
assert.noFile('package.json');
});
it('does not create gulp files', function() {
assert.noFile([
'gulpfile.js',
'gulp/browser-sync.js',
'gulp/css.js',
'gulp/images.js',
'gulp/javascript.js',
'gulp/settings.js'
]);
});
it('creates basic asset files', function() {
assert.file([
'js/main.js',
'sass/main.scss'
]);
assert.noFile('index.html');
});
it('creates correct asset path settings', function(done) {
fs.readFile(path.join(__dirname, 'extbase-extension-asset-paths-json.txt'), 'utf-8', function(err, expected) {
if (err) {
throw err;
}
assert.fileContent('asset-paths.json', expected);
done();
});
});
});
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment