Skip to content

Commit 6d44d94

Browse files
authored
Remove msw option from setupApplicationTest() fn (#10969)
This is no longer needed since we're not running MSW and Mirage in parallel anymore.
1 parent 10fcf3b commit 6d44d94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+48
-53
lines changed

tests/acceptance/404-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import percySnapshot from '@percy/ember';
66
import { setupApplicationTest } from 'crates-io/tests/helpers';
77

88
module('Acceptance | 404', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
test('/unknown-route shows a 404 page', async function (assert) {
1212
await visit('/unknown-route');

tests/acceptance/api-token-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import { visit } from '../helpers/visit-ignoring-abort';
1010

1111
module('Acceptance | api-tokens', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
function prepare(context) {
1515
let user = context.db.user.create({

tests/acceptance/categories-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import axeConfig from '../axe-config';
1010

1111
module('Acceptance | categories', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
test('listing categories', async function (assert) {
1515
this.owner.lookup('service:intl').locale = 'en';

tests/acceptance/crate-deletion-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
66
import { visit } from '../helpers/visit-ignoring-abort';
77

88
module('Acceptance | crate deletion', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
test('happy path', async function (assert) {
1212
let user = this.db.user.create();

tests/acceptance/crate-dependencies-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import axeConfig from '../axe-config';
1313
import { visit } from '../helpers/visit-ignoring-abort';
1414

1515
module('Acceptance | crate dependencies page', function (hooks) {
16-
setupApplicationTest(hooks, { msw: true });
16+
setupApplicationTest(hooks);
1717

1818
test('shows the lists of dependencies', async function (assert) {
1919
loadFixtures(this.db);

tests/acceptance/crate-following-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { http, HttpResponse } from 'msw';
88
import { setupApplicationTest } from 'crates-io/tests/helpers';
99

1010
module('Acceptance | Crate following', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
function prepare(context, { loggedIn = true, following = false } = {}) {
1414
let { db } = context;

tests/acceptance/crate-navtabs-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const TAB_REV_DEPS = '[data-test-rev-deps-tab] a';
1010
const TAB_SETTINGS = '[data-test-settings-tab] a';
1111

1212
module('Acceptance | crate navigation tabs', function (hooks) {
13-
setupApplicationTest(hooks, { msw: true });
13+
setupApplicationTest(hooks);
1414

1515
test('basic navigation between tabs works as expected', async function (assert) {
1616
let crate = this.db.crate.create({ name: 'nanomsg' });

tests/acceptance/crate-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import axeConfig from '../axe-config';
1313
import { visit } from '../helpers/visit-ignoring-abort';
1414

1515
module('Acceptance | crate page', function (hooks) {
16-
setupApplicationTest(hooks, { msw: true });
16+
setupApplicationTest(hooks);
1717

1818
test('visiting a crate page from the front page', async function (assert) {
1919
let crate = this.db.crate.create({ name: 'nanomsg', newest_version: '0.6.1' });

tests/acceptance/crates-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import axeConfig from '../axe-config';
1313
import { visit } from '../helpers/visit-ignoring-abort';
1414

1515
module('Acceptance | crates page', function (hooks) {
16-
setupApplicationTest(hooks, { msw: true });
16+
setupApplicationTest(hooks);
1717

1818
// should match the default set in the crates controller
1919
const per_page = 50;

tests/acceptance/dashboard-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import { visit } from '../helpers/visit-ignoring-abort';
1010

1111
module('Acceptance | Dashboard', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
test('shows "page requires authentication" error when not logged in', async function (assert) {
1515
await visit('/dashboard');

tests/acceptance/dev-mode-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (s.has('devmode')) {
1111
* @link http://localhost:4200/tests/?notrycatch&devmode&filter=Development%20Mode
1212
*/
1313
module('Development Mode', function (hooks) {
14-
setupApplicationTest(hooks, { msw: true });
14+
setupApplicationTest(hooks);
1515

1616
test('authenticated', async function () {
1717
let user = this.db.user.create();

tests/acceptance/email-change-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { visit } from '../helpers/visit-ignoring-abort';
99

1010
module('Acceptance | Email Change', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
test('happy path', async function (assert) {
1414
let user = this.db.user.create({ email: '[email protected]' });

tests/acceptance/email-confirmation-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
66
import { visit } from '../helpers/visit-ignoring-abort';
77

88
module('Acceptance | Email Confirmation', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
test('unauthenticated happy path', async function (assert) {
1212
let user = this.db.user.create({ emailVerificationToken: 'badc0ffee' });

tests/acceptance/front-page-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
1414
import axeConfig from '../axe-config';
1515

1616
module('Acceptance | front page', function (hooks) {
17-
setupApplicationTest(hooks, { msw: true });
17+
setupApplicationTest(hooks);
1818

1919
test('visiting /', async function (assert) {
2020
this.owner.lookup('service:intl').locale = 'en';

tests/acceptance/invites-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import { visit } from '../helpers/visit-ignoring-abort';
1010

1111
module('Acceptance | /me/pending-invites', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
function prepare(context) {
1515
let inviter = context.db.user.create({ name: 'janed' });

tests/acceptance/keyword-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import axeConfig from '../axe-config';
1010

1111
module('Acceptance | keywords', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
test('keyword/:keyword_id index default sort is recent-downloads', async function (assert) {
1515
this.db.keyword.create({ keyword: 'network' });

tests/acceptance/login-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { http, HttpResponse } from 'msw';
1010
import { setupApplicationTest } from 'crates-io/tests/helpers';
1111

1212
module('Acceptance | Login', function (hooks) {
13-
setupApplicationTest(hooks, { msw: true });
13+
setupApplicationTest(hooks);
1414
setupWindowMock(hooks);
1515

1616
test('successful login', async function (assert) {

tests/acceptance/logout-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { setupWindowMock } from 'ember-window-mock/test-support';
77
import { setupApplicationTest } from 'crates-io/tests/helpers';
88

99
module('Acceptance | Logout', function (hooks) {
10-
setupApplicationTest(hooks, { msw: true });
10+
setupApplicationTest(hooks);
1111
setupWindowMock(hooks);
1212

1313
test('successful logout', async function (assert) {

tests/acceptance/publish-notifications-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { http, HttpResponse } from 'msw';
88
import { setupApplicationTest } from 'crates-io/tests/helpers';
99

1010
module('Acceptance | publish notifications', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
test('unsubscribe and resubscribe', async function (assert) {
1414
let user = this.db.user.create();

tests/acceptance/read-only-mode-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { AjaxError } from '../../utils/ajax';
99

1010
module('Acceptance | Read-only Mode', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
test('notification is not shown for read-write mode', async function (assert) {
1414
await visit('/');

tests/acceptance/readme-rendering-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ graph TD;
9292
`;
9393

9494
module('Acceptance | README rendering', function (hooks) {
95-
setupApplicationTest(hooks, { msw: true });
95+
setupApplicationTest(hooks);
9696

9797
test('it works', async function (assert) {
9898
let crate = this.db.crate.create({ name: 'serde' });

tests/acceptance/reverse-dependencies-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { visit } from '../helpers/visit-ignoring-abort';
99

1010
module('Acceptance | /crates/:crate_id/reverse_dependencies', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
function prepare({ db }) {
1414
let foo = db.crate.create({ name: 'foo' });

tests/acceptance/search-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
1515
import axeConfig from '../axe-config';
1616

1717
module('Acceptance | search', function (hooks) {
18-
setupApplicationTest(hooks, { msw: true });
18+
setupApplicationTest(hooks);
1919

2020
test('searching for "rust"', async function (assert) {
2121
loadFixtures(this.db);

tests/acceptance/settings/add-owner-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { module, test } from 'qunit';
44
import { setupApplicationTest } from 'crates-io/tests/helpers';
55

66
module('Acceptance | Settings | Add Owner', function (hooks) {
7-
setupApplicationTest(hooks, { msw: true });
7+
setupApplicationTest(hooks);
88

99
function prepare(context) {
1010
let { db } = context;

tests/acceptance/settings/remove-owner-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { http, HttpResponse } from 'msw';
66
import { setupApplicationTest } from 'crates-io/tests/helpers';
77

88
module('Acceptance | Settings | Remove Owner', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
function prepare(context) {
1212
let { db } = context;

tests/acceptance/settings/settings-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import axeConfig from '../../axe-config';
1010

1111
module('Acceptance | Settings', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
function prepare(context) {
1515
let { db } = context;

tests/acceptance/sudo-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { visit } from '../helpers/visit-ignoring-abort';
99

1010
module('Acceptance | sudo', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
function prepare(context, isAdmin) {
1414
const user = context.db.user.create({

tests/acceptance/support-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import axeConfig from '../axe-config';
1212
import { visit } from '../helpers/visit-ignoring-abort';
1313

1414
module('Acceptance | support', function (hooks) {
15-
setupApplicationTest(hooks, { msw: true });
15+
setupApplicationTest(hooks);
1616

1717
test('shows an inquire list', async function (assert) {
1818
await visit('/support');

tests/acceptance/team-page-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
1010
import axeConfig from '../axe-config';
1111

1212
module('Acceptance | team page', function (hooks) {
13-
setupApplicationTest(hooks, { msw: true });
13+
setupApplicationTest(hooks);
1414

1515
test('has team organization display', async function (assert) {
1616
loadFixtures(this.db);

tests/acceptance/token-invites-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
99
import { visit } from '../helpers/visit-ignoring-abort';
1010

1111
module('Acceptance | /accept-invite/:token', function (hooks) {
12-
setupApplicationTest(hooks, { msw: true });
12+
setupApplicationTest(hooks);
1313

1414
test('visiting to /accept-invite shows 404 page', async function (assert) {
1515
await visit('/accept-invite');

tests/acceptance/user-page-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
1010
import axeConfig from '../axe-config';
1111

1212
module('Acceptance | user page', function (hooks) {
13-
setupApplicationTest(hooks, { msw: true });
13+
setupApplicationTest(hooks);
1414

1515
test('has user display', async function (assert) {
1616
loadFixtures(this.db);

tests/acceptance/versions-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import percySnapshot from '@percy/ember';
66
import { setupApplicationTest } from 'crates-io/tests/helpers';
77

88
module('Acceptance | crate versions page', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
test('show versions sorted by date', async function (assert) {
1212
let crate = this.db.crate.create({ name: 'nanomsg' });

tests/bugs/2329-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
1010
import { visit } from '../helpers/visit-ignoring-abort';
1111

1212
module('Bug #2329', function (hooks) {
13-
setupApplicationTest(hooks, { msw: true });
13+
setupApplicationTest(hooks);
1414
setupWindowMock(hooks);
1515

1616
test('is fixed', async function (assert) {

tests/bugs/4506-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
66
import { visit } from '../helpers/visit-ignoring-abort';
77

88
module('Bug #4506', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
function prepare(context) {
1212
let { db } = context;

tests/helpers/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ export { setupTest, setupRenderingTest } from 'ember-qunit';
77

88
// see http://emberjs.github.io/rfcs/0637-customizable-test-setups.html
99
export function setupApplicationTest(hooks, options = {}) {
10-
let { msw } = options;
11-
1210
upstreamSetupApplicationTest(hooks, options);
1311

14-
if (msw) {
15-
setupMSW(hooks);
16-
}
17-
12+
setupMSW(hooks);
1813
setupSentryMock(hooks);
1914
setupAppTestDataAttr(hooks);
2015
}

tests/routes/category-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { visit } from '../helpers/visit-ignoring-abort';
99

1010
module('Route | category', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
test("shows an error message if the category can't be found", async function (assert) {
1414
await visit('/categories/foo');

tests/routes/crate/delete-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
1111
import { visit } from '../../helpers/visit-ignoring-abort';
1212

1313
module('Route: crate.delete', function (hooks) {
14-
setupApplicationTest(hooks, { msw: true });
14+
setupApplicationTest(hooks);
1515

1616
function prepare(context) {
1717
let user = context.db.user.create();

tests/routes/crate/range-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { visit } from '../../helpers/visit-ignoring-abort';
99

1010
module('Route | crate.range', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
test('happy path', async function (assert) {
1414
let crate = this.db.crate.create({ name: 'foo' });

tests/routes/crate/settings-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
66
import { visit } from '../../helpers/visit-ignoring-abort';
77

88
module('Route | crate.settings', hooks => {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
function prepare(context) {
1212
const user = context.db.user.create();

tests/routes/crate/version/crate-links-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { module, test } from 'qunit';
44
import { setupApplicationTest } from 'crates-io/tests/helpers';
55

66
module('Route | crate.version | crate links', function (hooks) {
7-
setupApplicationTest(hooks, { msw: true });
7+
setupApplicationTest(hooks);
88

99
test('shows all external crate links', async function (assert) {
1010
let crate = this.db.crate.create({

tests/routes/crate/version/docs-link-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { http, HttpResponse } from 'msw';
66
import { setupApplicationTest } from 'crates-io/tests/helpers';
77

88
module('Route | crate.version | docs link', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
test('shows regular documentation link', async function (assert) {
1212
let crate = this.db.crate.create({ name: 'foo', documentation: 'https://foo.io/docs' });

tests/routes/crate/version/model-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
66
import { visit } from '../../../helpers/visit-ignoring-abort';
77

88
module('Route | crate.version | model() hook', function (hooks) {
9-
setupApplicationTest(hooks, { msw: true });
9+
setupApplicationTest(hooks);
1010

1111
module('with explicit version number in the URL', function () {
1212
test('shows yanked versions', async function (assert) {

tests/routes/keyword-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { setupApplicationTest } from 'crates-io/tests/helpers';
88
import { visit } from '../helpers/visit-ignoring-abort';
99

1010
module('Route | keyword', function (hooks) {
11-
setupApplicationTest(hooks, { msw: true });
11+
setupApplicationTest(hooks);
1212

1313
test('shows an empty list if the keyword does not exist on the server', async function (assert) {
1414
await visit('/keywords/foo');

0 commit comments

Comments
 (0)