Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Toolchain
sgc
Commits
a361f4c3
Commit
a361f4c3
authored
Jan 09, 2015
by
Philipp Nowinski
Browse files
[FEATURE] add test cases for extbase extension
parent
f326b91a
Changes
2
Hide whitespace changes
Inline
Side-by-side
test/extbase-extension-asset-paths-json.txt
0 → 100644
View file @
a361f4c3
{
"css": "css",
"sass": "sass",
"javascript": "js",
"compassConfig": ".",
"images": "imgs"
}
test/test-extbase-extension.js
0 → 100644
View file @
a361f4c3
/*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
();
});
});
});
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment