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
8c463eca
Commit
8c463eca
authored
Jul 21, 2015
by
Philipp Nowinski
Browse files
[TASK] adjust tests
parent
00ec8009
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test-typo3-frontend.js
View file @
8c463eca
...
...
@@ -18,6 +18,8 @@ describe('sgalinski generator', function() {
sassPath
:
'
sass
'
,
javascriptPath
:
'
js
'
,
imagesPath
:
'
images
'
,
svgPath
:
'
svg
'
,
spritePath
:
'
sprites
'
,
extensions
:
'
test_ext,test_ext_two
'
})
.
on
(
'
end
'
,
done
);
...
...
@@ -27,6 +29,7 @@ describe('sgalinski generator', function() {
assert
.
file
([
'
.editorconfig
'
,
'
.jshintrc
'
,
'
.scss-lint.yml
'
,
'
package.json
'
]);
});
...
...
@@ -48,6 +51,8 @@ describe('sgalinski generator', function() {
assert
.
fileContent
(
'
gulp/config.json
'
,
'
"javascript": "js"
'
);
assert
.
fileContent
(
'
gulp/config.json
'
,
'
"sass": "sass"
'
);
assert
.
fileContent
(
'
gulp/config.json
'
,
'
"images": "images"
'
);
assert
.
fileContent
(
'
gulp/config.json
'
,
'
"svg": "images/svg"
'
);
assert
.
fileContent
(
'
gulp/config.json
'
,
'
"sprites": "images/sprites"
'
);
assert
.
fileContent
(
'
gulp/config.json
'
,
'
"extensions": [
\n\t\t
"test_ext",
\n\t\t
"test_ext_two"
\n\t
]
'
);
});
...
...
@@ -55,16 +60,17 @@ describe('sgalinski generator', function() {
assert
.
fileContent
(
'
gulp/css.js
'
,
'
.pipe(autoprefixer(
\'
last 1 version
\'
))
'
);
});
it
(
'
does not install minification
'
,
function
()
{
assert
.
noFileContent
(
'
package.json
'
,
'
gulp-minify-css
'
);
assert
.
noFileContent
(
'
package.json
'
,
'
gulp-uglify
'
);
assert
.
noFileContent
(
'
gulp/css.js
'
,
'
minifyCss = require(
\'
gulp-minify-css
\'
)
'
);
assert
.
noFileContent
(
'
gulp/javascript.js
'
,
'
uglify = require(
\'
gulp-uglify
\'
)
'
);
it
(
'
does set no JS and CSS limits
'
,
function
()
{
assert
.
noFileContent
(
'
gulp/css.js
'
,
'
filesizeLimit
'
);
assert
.
noFileContent
(
'
gulp/css.js
'
,
'
filesizeLimitGzipped
'
);
assert
.
noFileContent
(
'
gulp/javascript.js
'
,
'
filesizeLimit
'
);
assert
.
noFileContent
(
'
gulp/javascript.js
'
,
'
filesizeLimitGzipped
'
);
});
});
describe
(
'
sgalinski generator with
minification
'
,
function
()
{
describe
(
'
sgalinski generator with
filesizelimits
'
,
function
()
{
before
(
function
(
done
)
{
helpers
.
run
(
path
.
join
(
__dirname
,
'
../app
'
))
.
inDir
(
path
.
join
(
os
.
tmpdir
(),
'
./temp-test
'
))
...
...
@@ -76,18 +82,22 @@ describe('sgalinski generator with minification', function() {
sassPath
:
'
sass
'
,
javascriptPath
:
'
js
'
,
imagesPath
:
'
images
'
,
extensions
:
'
test_ext,test_ext_two
'
,
minifyCss
:
true
,
jsuglify
:
true
svgPath
:
'
svg
'
,
spritePath
:
'
sprites
'
,
filesizeLimitCss
:
2500
,
filesizeLimitGzippedCss
:
1500
,
filesizeLimitJs
:
2500
,
filesizeLimitGzippedJs
:
1500
})
.
on
(
'
end
'
,
done
);
});
it
(
'
does not install minification
'
,
function
()
{
assert
.
fileContent
(
'
package.json
'
,
'
gulp-minify-css
'
);
assert
.
fileContent
(
'
package.json
'
,
'
gulp-uglify
'
);
assert
.
fileContent
(
'
gulp/css.js
'
,
'
minifyCss = require(
\'
gulp-minify-css
\'
)
'
);
assert
.
fileContent
(
'
gulp/javascript.js
'
,
'
uglify = require(
\'
gulp-uglify
\'
)
'
);
it
(
'
does set correct JS and CSS limits
'
,
function
()
{
assert
.
fileContent
(
'
gulp/css.js
'
,
'
filesizeLimit: 2500
'
);
assert
.
fileContent
(
'
gulp/css.js
'
,
'
filesizeLimitGzipped: 1500
'
);
assert
.
fileContent
(
'
gulp/javascript.js
'
,
'
filesizeLimit: 2500
'
);
assert
.
fileContent
(
'
gulp/javascript.js
'
,
'
filesizeLimitGzipped: 1500
'
);
});
});
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