Skip to content

Commit

Permalink
move to mocha
Browse files Browse the repository at this point in the history
  • Loading branch information
stoeffel committed Feb 18, 2015
1 parent d97bb98 commit 895b448
Show file tree
Hide file tree
Showing 82 changed files with 1,250 additions and 16,610 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.project
.tmp_*
node_modules
coverage
28 changes: 23 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var gulp = require('gulp-param')(require('gulp'), process.argv),
qunit = require("gulp-qunit"),
mocha = require("gulp-mocha"),
istanbul = require('gulp-istanbul'),
uglify = require('gulp-uglify'),
clean = require('gulp-clean'),
bump = require('gulp-bump'),
Expand All @@ -10,13 +11,30 @@ var gulp = require('gulp-param')(require('gulp'), process.argv),
DEST = 'dist',
SRC_COMPILED = 'underscore.string.js',
MIN_FILE = 'underscore.string.min.js',
TEST_SUITES = ['test/test.html', 'test/test_standalone.html', 'test/test_underscore/index.html'],
VERSION_FILES = ['./package.json', './component.json', './bower.json'];
VERSION_FILES_JS = [SRC, 'package.js'];

gulp.task('test', ['browserify'], function() {
return gulp.src(TEST_SUITES)
.pipe(qunit());
gulp.task('test', ['browserify'], function(cov) {
var reporters = ['html'];

if (cov) {
reporters.push('text');
} else {
reporters.push('text-summary');
}

return gulp.src(['*.js', 'helper/*.js'])
.pipe(istanbul())
.pipe(istanbul.hookRequire())
.on('finish', function () {
return gulp.src(['tests/*.js'])
.pipe(mocha({
ui: 'qunit'
}))
.pipe(istanbul.writeReports({
reporters: reporters
}));
});
});

gulp.task('browserify', function() {
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,14 @@
"gulp-browserify": "~0.5.0",
"gulp-bump": "~0.1.11",
"gulp-clean": "~0.3.1",
"gulp-istanbul": "^0.6.0",
"gulp-mocha": "^2.0.0",
"gulp-param": "~0.6.3",
"gulp-qunit": "~1.1.0",
"gulp-rename": "~1.2.0",
"gulp-replace": "~0.5.0",
"gulp-uglify": "~1.0.1"
"gulp-uglify": "~1.0.1",
"mocha": "^2.1.0",
"underscore": "^1.7.0"
},
"jshintConfig": {
"node": true,
Expand All @@ -57,5 +60,6 @@
"globals": {
"s": true
}
}
},
"dependencies": {}
}
45 changes: 0 additions & 45 deletions test/run-qunit.js

This file was deleted.

148 changes: 0 additions & 148 deletions test/speed.js

This file was deleted.

Loading

0 comments on commit 895b448

Please sign in to comment.