Skip to content

Commit 5e28ece

Browse files
committed
Switch from Grunt to Gulp and create a test task using gulp-mocha
1 parent 21195e3 commit 5e28ece

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

Gruntfile.js

-20
This file was deleted.

gulpfile.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var gulp = require('gulp');
2+
var mocha = require('gulp-mocha');
3+
4+
gulp.task('default', function () {
5+
return gulp.src('tests/*.js', {read: false})
6+
.pipe(mocha({reporter: 'spec'}));
7+
});

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"devDependencies": {
55
"babel": "^5.0.12",
66
"chai": "^2.2.0",
7-
"grunt": "^0.4.5",
8-
"grunt-mocha": "^0.4.12",
7+
"gulp": "^3.8.11",
8+
"gulp-mocha": "^2.0.1",
99
"mocha": "^2.2.4"
1010
},
1111
"dependencies": {

bot.js src/bot.js

File renamed without changes.

card.js src/card.js

File renamed without changes.

deck.js src/deck.js

File renamed without changes.

main.js src/main.js

File renamed without changes.

tests/deck.js

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
require('babel/register');
2+
3+
var assert = require('chai').assert;
4+
5+
var Deck = require('../src/deck');
6+
7+
describe('Deck', function() {
8+
it('should contain 52 cards', function() {
9+
var deck = new Deck();
10+
assert(deck.cards !== null);
11+
assert(deck.cards.length === 52);
12+
});
13+
});

0 commit comments

Comments
 (0)