fix(tests): Improve test output (#16449)
* fix(tests): Improve test output Switches test-challengse from tap-spec to tap-difflet in pessimistic mode for a more concise test output. Also removes unused gulp tasks. Closes #16406 * build(npm-script): Update scripts to have developer mode test run
This commit is contained in:
38
gulpfile.js
38
gulpfile.js
@ -38,15 +38,7 @@ const Rx = require('rx'),
|
|||||||
|
|
||||||
// rev
|
// rev
|
||||||
rev = require('gulp-rev'),
|
rev = require('gulp-rev'),
|
||||||
revDel = require('rev-del'),
|
revDel = require('rev-del');
|
||||||
|
|
||||||
// lint
|
|
||||||
jsonlint = require('gulp-jsonlint'),
|
|
||||||
eslint = require('gulp-eslint'),
|
|
||||||
|
|
||||||
// unit-tests
|
|
||||||
tape = require('gulp-tape'),
|
|
||||||
tapSpec = require('tap-spec');
|
|
||||||
|
|
||||||
Rx.config.longStackSupport = true;
|
Rx.config.longStackSupport = true;
|
||||||
const sync = browserSync.create('fcc-sync-server');
|
const sync = browserSync.create('fcc-sync-server');
|
||||||
@ -246,27 +238,6 @@ gulp.task('dev-server', syncDepenedents, function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('lint-js', function() {
|
|
||||||
return gulp.src([
|
|
||||||
'common/**/*.js',
|
|
||||||
'common/**/*.jsx',
|
|
||||||
'client/**/*.js',
|
|
||||||
'client/**/*.jsx',
|
|
||||||
'server/**/*.js',
|
|
||||||
'config/**/*.js'
|
|
||||||
])
|
|
||||||
.pipe(eslint())
|
|
||||||
.pipe(eslint.format());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('lint-json', function() {
|
|
||||||
return gulp.src(paths.challenges)
|
|
||||||
.pipe(jsonlint())
|
|
||||||
.pipe(jsonlint.reporter());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task('test-challenges', ['lint-json']);
|
|
||||||
|
|
||||||
gulp.task('pack-client', function() {
|
gulp.task('pack-client', function() {
|
||||||
if (!__DEV__) { console.log('\n\nbundling production\n\n'); }
|
if (!__DEV__) { console.log('\n\nbundling production\n\n'); }
|
||||||
|
|
||||||
@ -448,10 +419,3 @@ gulp.task('default', [
|
|||||||
'dev-server',
|
'dev-server',
|
||||||
'pack-frame-runner'
|
'pack-frame-runner'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
gulp.task('test', function() {
|
|
||||||
return gulp.src('test/**/*.js')
|
|
||||||
.pipe(tape({
|
|
||||||
reporter: tapSpec()
|
|
||||||
}));
|
|
||||||
});
|
|
||||||
|
871
package-lock.json
generated
871
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -24,8 +24,10 @@
|
|||||||
"snyk-protect": "snyk protect",
|
"snyk-protect": "snyk protect",
|
||||||
"start": "babel-node server/server.js",
|
"start": "babel-node server/server.js",
|
||||||
"start-production": "node pm2Start",
|
"start-production": "node pm2Start",
|
||||||
"test-challenges": "babel-node seed/test-challenges.js | tap-spec",
|
|
||||||
"test": "npm run test-js && npm run test-challenges",
|
"test": "npm run test-js && npm run test-challenges",
|
||||||
|
"test-develop": "npm run test-js && npm run test-challenges-develop",
|
||||||
|
"test-challenges": "babel-node seed/test-challenges.js | tap-spec",
|
||||||
|
"test-challenges-develop": "babel-node seed/test-challenges.js | tap-difflet -p",
|
||||||
"test-js": "npm run test-js-client && npm run test-js-common && npm run test-js-server",
|
"test-js": "npm run test-js-client && npm run test-js-common && npm run test-js-server",
|
||||||
"test-js-client": "tape -r babel-register \"client/**/*.test.js\" | tap-spec",
|
"test-js-client": "tape -r babel-register \"client/**/*.test.js\" | tap-spec",
|
||||||
"test-js-common": "tape -r babel-register \"common/**/*.test.js\" | tap-spec",
|
"test-js-common": "tape -r babel-register \"common/**/*.test.js\" | tap-spec",
|
||||||
@ -156,8 +158,6 @@
|
|||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"gulp-babel": "^6.1.1",
|
"gulp-babel": "^6.1.1",
|
||||||
"gulp-concat": "^2.6.0",
|
"gulp-concat": "^2.6.0",
|
||||||
"gulp-eslint": "^3.0.1",
|
|
||||||
"gulp-jsonlint": "^1.1.0",
|
|
||||||
"gulp-less": "^3.0.3",
|
"gulp-less": "^3.0.3",
|
||||||
"gulp-nodemon": "^2.0.3",
|
"gulp-nodemon": "^2.0.3",
|
||||||
"gulp-notify": "^3.0.0",
|
"gulp-notify": "^3.0.0",
|
||||||
@ -165,7 +165,6 @@
|
|||||||
"gulp-reduce-file": "0.0.1",
|
"gulp-reduce-file": "0.0.1",
|
||||||
"gulp-rev": "^7.0.0",
|
"gulp-rev": "^7.0.0",
|
||||||
"gulp-sourcemaps": "^2.2.1",
|
"gulp-sourcemaps": "^2.2.1",
|
||||||
"gulp-tape": "0.0.9",
|
|
||||||
"gulp-uglify": "^2.0.0",
|
"gulp-uglify": "^2.0.0",
|
||||||
"gulp-util": "^3.0.6",
|
"gulp-util": "^3.0.6",
|
||||||
"husky": "^0.14.3",
|
"husky": "^0.14.3",
|
||||||
@ -182,6 +181,7 @@
|
|||||||
"rev-del": "^1.0.5",
|
"rev-del": "^1.0.5",
|
||||||
"sinon": "^2.0.0",
|
"sinon": "^2.0.0",
|
||||||
"sort-keys": "^1.1.1",
|
"sort-keys": "^1.1.1",
|
||||||
|
"tap-difflet": "^0.7.0",
|
||||||
"tap-spec": "^4.1.1",
|
"tap-spec": "^4.1.1",
|
||||||
"tape": "^4.2.2",
|
"tape": "^4.2.2",
|
||||||
"uglifyjs-webpack-plugin": "^1.1.8",
|
"uglifyjs-webpack-plugin": "^1.1.8",
|
||||||
|
Reference in New Issue
Block a user