Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scores

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scores - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

test/data/play-in-complete-2015.html

29

package.json
{
"name": "scores",
"description": "Track the completion of sports games from a URL.",
"version": "1.0.7",
"version": "1.0.8",
"author": "Nick Crohn",

@@ -17,20 +17,21 @@ "bugs": {

"dependencies": {
"bucker": "~1.0.5",
"cheerio": "~0.13.1",
"lodash": "~2.4.1",
"moment": "~2.5.1",
"moment-timezone": "0.0.3",
"request": "~2.33.0"
"bucker": "^1.0.11",
"cheerio": "^0.18.0",
"lodash": "^3.3.1",
"moment": "^2.9.0",
"moment-timezone": "^0.3.0",
"request": "^2.53.0"
},
"devDependencies": {
"commander": "~2.1.0",
"mocha": "~1.17.1",
"precommit-hook": "~0.3.10"
"commander": "^2.6.0",
"jshint": "^2.6.0",
"mocha": "^2.1.0",
"precommit-hook": "^1.0.7"
},
"homepage": "http://github.com/tweetyourbracket/scores",
"keywords": [
"bracket",
"ncaa",
"bracket",
"tweetyourbracket",
"scores"
"scores",
"tweetyourbracket"
],

@@ -48,2 +49,2 @@ "license": "MIT",

}
}
}

@@ -213,2 +213,38 @@ var assert = require('assert');

// Using play-in games since that is all that is available when im testing
it('Should work for completed games in 2015', function (done) {
var s = new ScoreTracker({
timezone: timezone,
interval: interval,
maxInterval: maxInterval,
dailyCutoff: dailyCutoff,
ignoreInitial: false
});
var games = [];
s.on('game', function (game) {
games.push([game.region, game.visitor.name, game.visitor.seed, game.visitor.isWinner].join(' '));
if (games.length === 2) {
assert.equal(games[0], 'SOUTH Robert Morris 16 true');
assert.equal(games[1], 'EAST Dayton 11 true');
done();
}
});
s.parse(fs.readFileSync('./test/data/play-in-complete-2015.html'));
});
it('Should work for not yet played games in 2015 first round', function () {
var now = moment().tz('America/New_York').hours(7).minutes(0).seconds(0).milliseconds(0);
var s = new ScoreTracker({
timezone: timezone,
interval: interval,
maxInterval: maxInterval,
dailyCutoff: dailyCutoff,
__now: now.clone()
});
s.parse(fs.readFileSync('./test/data/round-one-start-2015.html'));
var next = now.clone().tz('America/New_York').add(s.currentInterval, 'ms').format(format);
var expected = now.clone().tz('America/New_York').hours(12).minutes(15).seconds(0).milliseconds(0).format(format);
assert.equal(next, expected);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc