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