Skip to content

Update this addon to a more modern approach#30

Open
kiwiupover wants to merge 4 commits into
Ticketfly:masterfrom
kiwiupover:update-ember
Open

Update this addon to a more modern approach#30
kiwiupover wants to merge 4 commits into
Ticketfly:masterfrom
kiwiupover:update-ember

Conversation

@kiwiupover
Copy link
Copy Markdown

@kiwiupover kiwiupover commented Aug 8, 2021

  1. Remove the need to use Ember directly.
  2. Use ember-auto-import to use mockdate.
  3. Update ember-cli and ember to the latest version.
  4. Added github actions to run CI.
  5. Update tests to use modern ember idioms.

Comment thread addon/index.js
*/
const freezeDateAt = (...args) => {
trySet(Ember, 'run.backburner._platform.now', () => originalDate());
trySet(run, 'backburner._platform.now', originalDate.now());
Copy link
Copy Markdown

@jrjohnson jrjohnson Oct 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like backburner tries to call this as a function, so now should be passed here without calling it.

Suggested change
trySet(run, 'backburner._platform.now', originalDate.now());
trySet(run, 'backburner._platform.now', originalDate.now);

@kiwi-josh
Copy link
Copy Markdown
Contributor

Abit has changed since this PR was opened, therefore I've opened another one that is heavily inspired by these changes, but is up to date against the last ember version (4.4)
#35

(I've also made sure this comment is taken into account: #30 (comment))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants