{"id":16217615,"url":"https://github.com/kiwiupover/ember-mockdate","last_synced_at":"2026-03-15T18:38:42.185Z","repository":{"id":48094813,"uuid":"393542856","full_name":"kiwiupover/ember-mockdate","owner":"kiwiupover","description":"Mock date ","archived":false,"fork":false,"pushed_at":"2022-09-08T21:28:21.000Z","size":568,"stargazers_count":2,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-28T17:56:57.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiwiupover.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-07T01:01:35.000Z","updated_at":"2022-09-08T21:28:26.000Z","dependencies_parsed_at":"2022-08-12T18:31:16.729Z","dependency_job_id":null,"html_url":"https://github.com/kiwiupover/ember-mockdate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwiupover%2Fember-mockdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwiupover%2Fember-mockdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwiupover%2Fember-mockdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiwiupover%2Fember-mockdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiwiupover","download_url":"https://codeload.github.com/kiwiupover/ember-mockdate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243982182,"owners_count":20378605,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T11:45:47.566Z","updated_at":"2026-03-15T18:38:37.137Z","avatar_url":"https://github.com/kiwiupover.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-mockdate\n\nUse [MockDate](https://github.com/boblauer/MockDate) within your Ember applications.\n\n`ember-mockdate` is an updated version of the great [ember-mockdate-shim](https://github.com/Ticketfly/ember-mockdate-shim) using the same api.\n\n## Compatibility\n\n- Ember.js v3.16 or above\n- Ember CLI v3.16 or above\n- Node.js v10 or above\n\n## Installation\n\n```\nember install ember-mockdate\n```\n\n## Usage\n\nMockDate's `set` and `reset` methods are renamed to `freezeDateAt` and `unfreezeDate` respectively.\n\n```js\nimport { freezeDateAt, unfreezeDate } from 'ember-mockdate';\n\nfreezeDateAt(new Date('1/12/2017'));\nunfreezeDate();\n```\n\nThis is primarily useful for keeping the time data consistent between tests (ie: for visual diffs a la [Percy](https://percy.io/)). Any library methods that rely on `new Date()` will return consistent outputs. For example: [`moment()`](https://github.com/moment/moment/) and [`faker.date.recent`](https://github.com/Marak/faker.js/blob/master/lib/date.js#L66)\n\nYou 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!\n\nPlease note that acceptance test support is only available in Ember \u003e2.15.1 as that is when `backburner.js` introduced the ability to make \"now\" configurable. More info [here](https://github.com/BackburnerJS/backburner.js/commit/a6fe19eb26c2b7ed8360de19ca0cc9ae5b05f297).\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\nThis repo is a fork of [ember-mockdate-shim](https://github.com/Ticketfly/ember-mockdate-shim). Thank you to all the [contributors](https://github.com/Ticketfly/ember-mockdate-shim/graphs/contributors).\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwiupover%2Fember-mockdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiwiupover%2Fember-mockdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiwiupover%2Fember-mockdate/lists"}