Skip to content

Commit

Permalink
Merge pull request #274 from martynsmith/jirwin/ditch-mocha-for-tape-…
Browse files Browse the repository at this point in the history
…again

fix(tests): Ditch mocha and should for tape!
  • Loading branch information
Chris Nehren committed Jan 8, 2015
2 parents dc7d262 + ce702fb commit c6f9274
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.3.7",
"author": "Martyn Smith <martyn@dollyfish.net.nz>",
"scripts": {
"test": "./node_modules/mocha/bin/mocha --reporter list",
"test": "./node_modules/faucet/bin/cmd.js test/*.js",
"lint": "./node_modules/jscs/bin/jscs --preset=airbnb */*.js"
},
"contributors": [
Expand Down Expand Up @@ -34,9 +34,8 @@
"ansi-color": "0.2.1"
},
"devDependencies": {
"faucet": "0.0.1",
"jscs": "^1.9.0",
"mocha": "^1.20.0",
"should": "1.2.2",
"underscore": "^1.6.0"
"tape": "^3.0.3"
}
}
16 changes: 9 additions & 7 deletions test/parse-line.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// jshint unused:false

var irc = require('../lib/irc.js');
var should = require('should');
var _ = require('underscore');
var test = require('tape');

describe('irc.parseMessage', function() {
test('irc.parseMessage', function(t) {
var checks = {
':irc.dollyfish.net.nz 372 nodebot :The message of the day was last changed: 2012-6-16 23:57': {
prefix: 'irc.dollyfish.net.nz',
Expand Down Expand Up @@ -92,9 +91,12 @@ describe('irc.parseMessage', function() {
}
};

_.each(checks, function(result, line) {
it('parse ' + line, function() {
JSON.stringify(result).should.equal(JSON.stringify(irc.parseMessage(line)));
});
Object.keys(checks).forEach(function(line) {
t.equal(
JSON.stringify(checks[line]),
JSON.stringify(irc.parseMessage(line)),
line + ' parses correctly'
);
});
t.end();
});

0 comments on commit c6f9274

Please sign in to comment.