mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-25 10:03:45 +03:00
Handle scss in tests
This commit is contained in:
parent
1513f21637
commit
69fea61ef0
|
@ -5,7 +5,7 @@ var Server = require('karma').Server;
|
|||
/**
|
||||
* Run test once and exit
|
||||
*/
|
||||
gulp.task('test', function (done) {
|
||||
gulp.task('test', ['inlineTemplates'], function (done) {
|
||||
new Server({
|
||||
configFile: __dirname + '/../../karma.conf.js',
|
||||
singleRun: true
|
||||
|
|
|
@ -3,7 +3,13 @@ module.exports = function (config) {
|
|||
config.set({
|
||||
frameworks: ['phantomjs-shim', 'jspm', 'jasmine', 'sinon', 'should'],
|
||||
preprocessors: {
|
||||
'lib/**/!(*spec).js': ['babel', 'coverage']
|
||||
'lib/**/!(*spec).js': ['babel', 'regex', 'coverage']
|
||||
},
|
||||
|
||||
regexPreprocessor: {
|
||||
rules: [
|
||||
[ /'\.(.*?)\.css'/g, '\'.tmp$1.css\'']
|
||||
]
|
||||
},
|
||||
babelPreprocessor: {
|
||||
options: {
|
||||
|
@ -47,7 +53,7 @@ module.exports = function (config) {
|
|||
jspm: {
|
||||
config: 'system.config.js',
|
||||
loadFiles: ['tests/**/*.spec.js', 'tests/helpers.js', 'lib/**/*.js'],
|
||||
serveFiles: ['tests/schemas/**/*.json', 'lib/**/*.{html,css}'],
|
||||
serveFiles: ['tests/schemas/**/*.json', 'lib/**/*.html', '.tmp/lib/**/*.css'],
|
||||
nocache: true
|
||||
},
|
||||
|
||||
|
@ -56,6 +62,7 @@ module.exports = function (config) {
|
|||
'/lib/': '/base/lib/',
|
||||
'/jspm_packages/': '/base/jspm_packages/',
|
||||
'/node_modules/': '/base/node_modules/',
|
||||
'/.tmp/': '/base/.tmp/'
|
||||
},
|
||||
reporters: travis ? ['mocha', 'coverage', 'coveralls'] : ['mocha', 'coverage'],
|
||||
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
"karma-mocha-reporter": "^1.1.3",
|
||||
"karma-phantomjs-launcher": "^0.2.1",
|
||||
"karma-phantomjs-shim": "^1.1.2",
|
||||
"karma-regex-preprocessor": "github:makern/karma-regex-preprocessor",
|
||||
"karma-should": "^1.0.0",
|
||||
"karma-sinon": "^1.0.4",
|
||||
"phantomjs": "^1.9.19",
|
||||
|
@ -89,6 +90,5 @@
|
|||
"systemjs-builder": "^0.14.7",
|
||||
"vinyl-paths": "^2.0.0",
|
||||
"zone.js": "^0.5.8"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user