mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Use gulp-mocha and attach run both test type in npm test
This commit is contained in:
+10
-4
@@ -3,7 +3,8 @@ const buffer = require('vinyl-buffer');
|
||||
const fs = require('fs-extra');
|
||||
const gulp = require('gulp');
|
||||
const merge = require('merge-stream');
|
||||
const mochaPhantom = require('gulp-mocha-phantomjs');
|
||||
const mocha = require('gulp-mocha');
|
||||
const mochaPhantomJs = require('gulp-mocha-phantomjs');
|
||||
const sorcery = require('sorcery');
|
||||
const source = require('vinyl-source-stream');
|
||||
const sourcemaps = require('gulp-sourcemaps');
|
||||
@@ -71,9 +72,14 @@ gulp.task('browserify', ['tsc'], function() {
|
||||
return merge(bundleStream, copyAddons, copyStylesheets);
|
||||
});
|
||||
|
||||
gulp.task('test-phantom', function () {
|
||||
gulp.task('test-mocha', function () {
|
||||
return gulp.src(['lib/*test.js', 'lib/**/*test.js'], {read: false})
|
||||
.pipe(mocha())
|
||||
});
|
||||
|
||||
gulp.task('test-mocha-phantomjs', function () {
|
||||
return gulp.src('test-harness.html')
|
||||
.pipe(mochaPhantom());
|
||||
.pipe(mochaPhantomJs());
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -88,5 +94,5 @@ gulp.task('sorcery', ['browserify'], function () {
|
||||
});
|
||||
|
||||
gulp.task('build', ['sorcery']);
|
||||
|
||||
gulp.task('test', ['test-mocha', 'test-mocha-phantomjs']);
|
||||
gulp.task('default', ['build']);
|
||||
|
||||
+2
-2
@@ -47,12 +47,12 @@
|
||||
"glob": "^7.0.5",
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-cli": "^1.2.2",
|
||||
"gulp-mocha": "^3.0.1",
|
||||
"gulp-mocha-phantomjs": "^0.12.0",
|
||||
"gulp-sourcemaps": "1.9.1",
|
||||
"gulp-typescript": "^3.1.3",
|
||||
"jsdoc": "3.4.3",
|
||||
"merge-stream": "^1.0.1",
|
||||
"mocha": "2.5.3",
|
||||
"node-pty": "^0.4.1",
|
||||
"nodemon": "1.10.2",
|
||||
"sleep": "^3.0.1",
|
||||
@@ -68,7 +68,7 @@
|
||||
"start": "node demo/app",
|
||||
"dev": "nodemon -e js,ts --watch src --watch demo --exec npm start",
|
||||
"lint": "tslint src/*.ts src/**/*.ts",
|
||||
"test": "mocha --recursive ./lib",
|
||||
"test": "gulp test",
|
||||
"build:docs": "jsdoc -c jsdoc.json",
|
||||
"build": "gulp build",
|
||||
"prepublish": "npm run build"
|
||||
|
||||
Reference in New Issue
Block a user