Skip to content

Commit

Permalink
📝 Update QUnit example in README (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
twokul authored Jun 23, 2021
1 parent 1981889 commit 888f00c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,18 @@ call `percySnapshot` multiple times inside a single test, _you must provide a un
#### QUnit

``` javascript
describe('Acceptance: My app', () => {
// ...app setup
import { module, test } from 'qunit';
import { setupApplicationTest } from 'ember-qunit';
import { visit, currentURL } from '@ember/test-helpers';

describe('About page', () => {
test('should look good', () => {
await visit('/about');
await percySnapshot(assert);
// => Snapshot taken: "Acceptance: My app | About page | should look good"
});
module('Acceptance: My app', function(hooks) {
setupApplicationTest(hooks);

test('About page should look good', async function(assert) {
await visit('/about');
assert.equal(currentURL(), '/about');
await percySnapshot(assert);
// => Snapshot taken: "Acceptance: My app | About page should look good"
});
});
```
Expand Down

0 comments on commit 888f00c

Please sign in to comment.