git.schokokeks.org
Repositories
Help
Report an Issue
wirc-backend.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
c972b0c
Branches
Tags
master
wirc-backend.git
lib
node
node_modules
irc
test
test-parse-line.js
[ini]
Christian Fraß
commited
c972b0c
at 2021-11-18 23:53:54
test-parse-line.js
Blame
History
Raw
var parseMessage = require('../lib/parse_message'); var test = require('tape'); var testHelpers = require('./helpers'); test('irc.parseMessage', function(t) { var checks = testHelpers.getFixtures('parse-line'); Object.keys(checks).forEach(function(line) { var stripColors = false; if (checks[line].hasOwnProperty('stripColors')) { stripColors = checks[line].stripColors; delete checks[line].stripColors; } t.equal( JSON.stringify(checks[line]), JSON.stringify(parseMessage(line, stripColors)), line + ' parses correctly' ); }); t.end(); });