-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TECH] Migrer les tests mocha de Pix App sous QUnit (PIX-6330).
- Loading branch information
Showing
390 changed files
with
13,157 additions
and
9,427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 6 additions & 7 deletions
13
mon-pix/blueprints/acceptance-test/files/tests/acceptance/__name___test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { describe, it } from 'mocha'; | ||
import { expect } from 'chai'; | ||
import { setupApplicationTest } from 'ember-mocha'; | ||
import { module, test } from 'qunit'; | ||
import { setupApplicationTest } from 'ember-qunit'; | ||
import { visit, currentURL } from '@ember/test-helpers'; | ||
|
||
describe('Acceptance | <%= dasherizedModuleName %>', function() { | ||
setupApplicationTest(); | ||
module('Acceptance | <%= dasherizedModuleName %>', function (hooks) { | ||
setupApplicationTest(hooks); | ||
|
||
it('can visit /<%= dasherizedModuleName %>', async function() { | ||
test('can visit /<%= dasherizedModuleName %>', async function (assert) { | ||
await visit('/<%= dasherizedModuleName %>'); | ||
expect(currentURL()).to.equal('/<%= dasherizedModuleName %>'); | ||
assert.strictEqual(currentURL(), '/<%= dasherizedModuleName %>'); | ||
}); | ||
}); |
13 changes: 6 additions & 7 deletions
13
mon-pix/blueprints/adapter-test/files/tests/unit/adapters/__name___test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
describe('Unit | Adapter | <%= dasherizedModuleName %>', function () { | ||
setupTest(); | ||
module('Unit | Adapter | <%= dasherizedModuleName %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
// Replace this with your real tests. | ||
it('exists', function () { | ||
test('exists', function(assert) { | ||
const adapter = this.owner.lookup('adapter:<%= classifiedModuleName %>'); | ||
expect(adapter).to.be.ok; | ||
assert.ok(adapter); | ||
}); | ||
}); |
13 changes: 6 additions & 7 deletions
13
mon-pix/blueprints/component-test/files/tests/integration/components/__name___test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupRenderingTest } from 'ember-mocha'; | ||
import { module, test } from 'qunit'; | ||
import { setupRenderingTest } from 'ember-qunit'; | ||
import { render } from '@ember/test-helpers'; | ||
import { hbs } from 'ember-cli-htmlbars'; | ||
|
||
describe('Integration | Component | <%= dasherizedModuleName %>', function() { | ||
setupRenderingTest(); | ||
module('Integration | Component | <%= dasherizedModuleName %>', function (hooks) { | ||
setupRenderingTest(hooks); | ||
|
||
it('replace this by your real test', async function() { | ||
test('replace this by your real test', async function (assert) { | ||
// given | ||
|
||
// when | ||
await render(hbs`<<%= classifiedModuleName %> />`); | ||
|
||
// then | ||
expect(true).to.be.true; | ||
assert.strictEqual(true, true); | ||
}); | ||
}); |
13 changes: 6 additions & 7 deletions
13
mon-pix/blueprints/route-test/files/tests/unit/routes/__name___test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { expect } from 'chai'; | ||
import { describe, it } from 'mocha'; | ||
import { setupTest } from 'ember-mocha'; | ||
import { module, test } from 'qunit'; | ||
import { setupTest } from 'ember-qunit'; | ||
|
||
describe('Unit | Route | <%= dasherizedModuleName %>', function () { | ||
setupTest(); | ||
module('Unit | Route | <%= dasherizedModuleName %>', function(hooks) { | ||
setupTest(hooks); | ||
|
||
it('exists', function () { | ||
test('exists', function(assert) { | ||
const route = this.owner.lookup('route:<%= classifiedModuleName %>'); | ||
expect(route).to.be.ok; | ||
assert.ok(route); | ||
}); | ||
}); |
Oops, something went wrong.