Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Provides methods for stubbing time.
npm install frozen
var freeze = require('frozen').freeze
, melt = require('frozen').melt;
describe('Time', function() {
afterEach(melt);
it('is frozen', function() {
freeze(new Date(2011, 1, 13, 8, 33, 14, 274));
var date1 = new Date();
sleep(30);
var date2 = new Date();
expect(date1.getFullYear()).to.equal(2011);
expect(date1.getMonth()).to.equal(1);
expect(date1.getDate()).to.equal(13);
expect(date1.getHours()).to.equal(8);
expect(date1.getMinutes()).to.equal(33);
expect(date1.getSeconds()).to.equal(14);
expect(date1.getMilliseconds()).to.equal(274);
expect(date2.getFullYear()).to.equal(2011);
expect(date2.getMonth()).to.equal(1);
expect(date2.getDate()).to.equal(13);
expect(date2.getHours()).to.equal(8);
expect(date2.getMinutes()).to.equal(33);
expect(date2.getSeconds()).to.equal(14);
expect(date2.getMilliseconds()).to.equal(274);
});
});
Freezes the current time to that of the date
argument (which must be a Date
), or the current datetime if no arguments are provided.
Returns Date
to the normal, native Date
.
FAQs
Provides functionality for freezing time and dates
We found that frozen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.