@bennadel/circuit-breaker
Version:
A flexible circuit breaker for Node.js (requires ES6 class modules).
21 lines (13 loc) • 573 B
JavaScript
// Require the core node modules.
var expect = require( "chai" ).expect;
// Require the application modules.
var Clock = require( "../lib/clock/Clock" );
// ----------------------------------------------------------------------------------- //
// ----------------------------------------------------------------------------------- //
describe( "Testing lib.clock.Clock", function() {
it( "should return the current time.", function() {
var clock = new Clock();
var now = Date.now();
expect( clock.getTickCount() ).to.be.within( now, ( now + 100 ) );
});
});