Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
ember-mockdate
Advanced tools
Use MockDate within your Ember applications.
ember-mockdate
is an updated version of the great ember-mockdate-shim using the same api.
ember install ember-mockdate
MockDate's set
and reset
methods are renamed to freezeDateAt
and unfreezeDate
respectively.
import { freezeDateAt, unfreezeDate } from 'ember-mockdate';
freezeDateAt(new Date('1/12/2017'));
unfreezeDate();
This is primarily useful for keeping the time data consistent between tests (ie: for visual diffs a la Percy). Any library methods that rely on new Date()
will return consistent outputs. For example: moment()
and faker.date.recent
You can use this in the beforeEach
and afterEach
hooks of your tests, or anywhere else you want to freeze the date at, how ever many times you want!
Please note that acceptance test support is only available in Ember >2.15.1 as that is when backburner.js
introduced the ability to make "now" configurable. More info here.
See the Contributing guide for details.
This repo is a fork of ember-mockdate-shim. Thank you to all the contributors.
This project is licensed under the MIT License.
FAQs
MockDate within your Ember application
The npm package ember-mockdate receives a total of 1,707 weekly downloads. As such, ember-mockdate popularity was classified as popular.
We found that ember-mockdate 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.