Skip to content

Commit

Permalink
tests/acceptance/versions: Migrate from mirage to @crates-io/msw
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Jan 24, 2025
1 parent c7e555b commit d90676c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/acceptance/versions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import percySnapshot from '@percy/ember';
import { setupApplicationTest } from 'crates-io/tests/helpers';

module('Acceptance | crate versions page', function (hooks) {
setupApplicationTest(hooks);
setupApplicationTest(hooks, { msw: true });

test('show versions sorted by date', async function (assert) {
let crate = this.server.create('crate', { name: 'nanomsg' });
this.server.create('version', { crate, num: '0.1.0', created_at: '2017-01-01' });
this.server.create('version', { crate, num: '0.2.0', created_at: '2018-01-01' });
this.server.create('version', { crate, num: '0.3.0', created_at: '2019-01-01', rust_version: '1.69' });
this.server.create('version', { crate, num: '0.2.1', created_at: '2020-01-01' });
let crate = this.db.crate.create({ name: 'nanomsg' });
this.db.version.create({ crate, num: '0.1.0', created_at: '2017-01-01' });
this.db.version.create({ crate, num: '0.2.0', created_at: '2018-01-01' });
this.db.version.create({ crate, num: '0.3.0', created_at: '2019-01-01', rust_version: '1.69' });
this.db.version.create({ crate, num: '0.2.1', created_at: '2020-01-01' });

await visit('/crates/nanomsg/versions');
assert.strictEqual(currentURL(), '/crates/nanomsg/versions');
Expand Down

0 comments on commit d90676c

Please sign in to comment.