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

Clarified how to update tests/test-helper.js when migrating ember-qunit to v5.x #919

Merged
merged 1 commit into from
Dec 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,21 @@ Import and run the `setup` function in your `test-helper.js` file:

```js
// tests/test-helper.js
import * as QUnit from 'qunit';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if it'd be good to show the default import statements,

import Application from 'my-project-name/app';
import config from 'my-project-name/config/environment';
import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';

to make it even clearer where we get setApplication, Application, config, and start from.

I can push another commit to add these import statements if you'd like.

import { setup } from 'qunit-dom';

//...

setup(QUnit.assert);

setApplication(Application.create(config.APP));

start();

//...
```

this will attach the APIs to QUnit's `assert` object.
This will attach the APIs to QUnit's `assert` object.

### Ember projects using `ember-qunit` v4.x and below

Expand Down