Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE] refactor: Remove runloop usage in integration/store-tests module deleteRecord #6713

Conversation

dmuneras
Copy link
Contributor

Description

  • Remove usage of runloop in store - deleteRecord module tests.
  • Remove beforeEach loop usage in the module and setup data in each test.

@dmuneras dmuneras changed the title chore: refactor: Remove runloop usage in integration/store-tests module deleteRecord [CHORE] refactor: Remove runloop usage in integration/store-tests module deleteRecord Nov 10, 2019
});

assert.ok(store.hasRecordForId('person', 1), 'expected the record to be in the store');
person = store.peekRecord('person', '1');
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note when using push for a single-resource-document we can just use the returned record vs following with a peek. e.g.

const person = store.push({ data: { ... } });

});
try {
store.push({ data: null });
} catch (_error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I love this improvement :)

@runspired runspired merged commit 6784ede into emberjs:master Nov 11, 2019
@runspired runspired added 🏷️ test This PR primarily adds tests for a feature 🎯 canary PR is targeting canary (default) 🔌 Project Unplug 🔌 labels Nov 11, 2019
@runspired runspired removed the 🎯 canary PR is targeting canary (default) label May 27, 2021
@runspired runspired added this to the 🔌 Unplug milestone Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ test This PR primarily adds tests for a feature 🔌 Project Unplug 🔌
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants