https://github.com/ContentMine/quickscrape
Tip revision: 19cefd9efb642e12e3ba2d1008f79142727c13c9 authored by Richard Smith-Unna on 12 October 2015, 10:28:55 UTC
Release v0.4.7.
Release v0.4.7.
Tip revision: 19cefd9
eventParseSpec.js
var ep = require('../lib/eventparse.js')
, should = require('should');
describe("eventparse", function() {
describe("compose()", function() {
it("should compose a message with all relevant info", function() {
var event = 'scraper.downloadStarted'
, var1 = 'file.txt'
, var2 = 'http://place.com';
msg = ep.compose(event, var1, var2);
msg.should.match(/scraper/);
msg.should.match(/download started/);
msg.should.match(RegExp(var1));
msg.should.match(RegExp(var2));
});
});
});