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:
Timo
2018-02-14 12:50:27 +01:00
committed by Stuart Taylor
parent 9f63625411
commit 673bab4761
3 changed files with 450 additions and 467 deletions

View File

@ -38,15 +38,7 @@ const Rx = require('rx'),
// rev
rev = require('gulp-rev'),
revDel = require('rev-del'),
// lint
jsonlint = require('gulp-jsonlint'),
eslint = require('gulp-eslint'),
// unit-tests
tape = require('gulp-tape'),
tapSpec = require('tap-spec');
revDel = require('rev-del');
Rx.config.longStackSupport = true;
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() {
if (!__DEV__) { console.log('\n\nbundling production\n\n'); }
@ -448,10 +419,3 @@ gulp.task('default', [
'dev-server',
'pack-frame-runner'
]);
gulp.task('test', function() {
return gulp.src('test/**/*.js')
.pipe(tape({
reporter: tapSpec()
}));
});

871
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,8 +24,10 @@
"snyk-protect": "snyk protect",
"start": "babel-node server/server.js",
"start-production": "node pm2Start",
"test-challenges": "babel-node seed/test-challenges.js | tap-spec",
"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-client": "tape -r babel-register \"client/**/*.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-babel": "^6.1.1",
"gulp-concat": "^2.6.0",
"gulp-eslint": "^3.0.1",
"gulp-jsonlint": "^1.1.0",
"gulp-less": "^3.0.3",
"gulp-nodemon": "^2.0.3",
"gulp-notify": "^3.0.0",
@ -165,7 +165,6 @@
"gulp-reduce-file": "0.0.1",
"gulp-rev": "^7.0.0",
"gulp-sourcemaps": "^2.2.1",
"gulp-tape": "0.0.9",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.6",
"husky": "^0.14.3",
@ -182,6 +181,7 @@
"rev-del": "^1.0.5",
"sinon": "^2.0.0",
"sort-keys": "^1.1.1",
"tap-difflet": "^0.7.0",
"tap-spec": "^4.1.1",
"tape": "^4.2.2",
"uglifyjs-webpack-plugin": "^1.1.8",