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

Unit testing model circular relationship requires startApp() #91

Closed
ming-codes opened this issue Sep 20, 2014 · 2 comments
Closed

Unit testing model circular relationship requires startApp() #91

ming-codes opened this issue Sep 20, 2014 · 2 comments

Comments

@ming-codes
Copy link

..or else the test fails with "cannot find model".

Is this a must or we can somehow get rid of this requirement?

export default DS.Model.extend({
  players: DS.hasMany('player')
});
export default DS.Model.extend({
  tags: DS.hasMany('tags')
});
@ming-codes
Copy link
Author

Nevermind, this is a non-issue.

Turns out the reason I have failed tests is because my model has very deep nested hasMany and belongsTo relationship. needs in moduleForModel does not automatically resolve these nested model relationship. So I need to add them all to needs.

@rwjblue
Copy link
Member

rwjblue commented Sep 20, 2014

Awesome, thank you for sharing the solution!

Turbo87 pushed a commit that referenced this issue Oct 13, 2018
Bumps [ember-cli-dependency-checker](https://github.com/quaertym/ember-cli-dependency-checker) from 2.2.1 to 3.0.0.
<details>
<summary>Commits</summary>

- [`b41dc34`](quaertym/ember-cli-dependency-checker@b41dc34) 3.0.0
- [`8b6378a`](quaertym/ember-cli-dependency-checker@8b6378a) Merge pull request [#91](https://github-redirect.dependabot.com/quaertym/ember-cli-dependency-checker/issues/91) from jacobq/update-ember-cli
- [`680dc7d`](quaertym/ember-cli-dependency-checker@680dc7d) v2.2.1
- [`614de60`](quaertym/ember-cli-dependency-checker@614de60) Upgrade dependencies to latest major version
- [`9947062`](quaertym/ember-cli-dependency-checker@9947062) Replace 'var' with 'let'/'const'
- [`7f22624`](quaertym/ember-cli-dependency-checker@7f22624) ember-cli-update (--to 3.2); drop node v4.x
- See full diff in [compare view](quaertym/ember-cli-dependency-checker@v2.2.1...v3.0.0)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=ember-cli-dependency-checker&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=3.0.0)](https://dependabot.com/compatibility-score.html?dependency-name=ember-cli-dependency-checker&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=3.0.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

Dependabot will **not** automatically merge this PR because it includes an out-of-range update to a development dependency.

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
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

No branches or pull requests

2 participants