Skip to content

Commit a328a12

Browse files
committed
Remove obsolete ember-cli-mirage setup
1 parent c34c9df commit a328a12

File tree

112 files changed

+14
-6439
lines changed

Some content is hidden

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

112 files changed

+14
-6439
lines changed

.eslintrc.js

-9
Original file line numberDiff line numberDiff line change
@@ -107,15 +107,6 @@ module.exports = {
107107
},
108108
},
109109

110-
// mirage files
111-
{
112-
files: ['mirage/**/*.js'],
113-
rules: {
114-
// disabled because of different `.find()` meaning
115-
'unicorn/no-array-callback-reference': 'off',
116-
},
117-
},
118-
119110
// node files
120111
{
121112
files: [

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
files_ignore: |
4040
app/**
4141
e2e/**
42-
mirage/**
42+
packages/**
4343
public/**
4444
tests/**
4545
.eslintrc

app/initializers/ember-cli-mirage.js

-36
This file was deleted.

config/environment.js

-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ module.exports = function (environment) {
6363

6464
if (environment === 'production') {
6565
// here you can enable a production-specific feature
66-
delete ENV['ember-cli-mirage'];
67-
6866
ENV.sentry = {
6967
dsn: process.env.SENTRY_DSN_WEB,
7068
};

docs/ARCHITECTURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ These files have to do with the frontend:
5151
- `.ember-cli` - Settings for the `ember` command line interface
5252
- `ember-cli-build.js` - Contains the build specification for Broccoli
5353
- `.eslintrc.js` - Defines Javascript coding style guidelines (enforced during CI???)
54-
- `mirage/` - A mock backend used during development and testing
5554
- `node_modules/` - npm dependencies - (ignored in `.gitignore`)
55+
- `packages/crates-io-msw` - A mock backend used for testing
5656
- `package.json` - Defines the npm package and its dependencies
5757
- `package-lock.json` - Locks dependencies to specific versions providing consistency across
5858
development and deployment

docs/CONTRIBUTING.md

+6-12
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,12 @@ To build and serve the frontend assets, use the command `pnpm start`. There
134134
are variations on this command that change which backend your frontend tries to
135135
talk to:
136136

137-
| Command | Backend | Use case |
138-
| ----------------------------------------- | --------------------------------------------- | ------------------------------------------------------- |
139-
| `pnpm start:live` | <https://crates.io> | Testing UI changes with the full live site's data |
140-
| `pnpm start:staging` | <https://staging-crates-io.herokuapp.com> | Testing UI changes with a smaller set of realistic data |
141-
| `pnpm start` | Static fixture test data in `mirage/fixtures` | Setting up particular situations, see note |
142-
| `pnpm start:local` | Backend server running locally | See the Working on the backend section for setup |
143-
| `pnpm start -- --proxy https://crates.io` | Whatever is specified in `--proxy` arg | If your use case is not covered here |
144-
145-
> Note: If you want to set up a particular situation, you can edit the fixture
146-
> data used for tests in `mirage/fixtures`. The fixture data does not currently
147-
> contain JSON needed to support every page, so some pages might not load
148-
> correctly.
137+
| Command | Backend | Use case |
138+
| ----------------------------------------- | ----------------------------------------- | ------------------------------------------------------- |
139+
| `pnpm start:live` | <https://crates.io> | Testing UI changes with the full live site's data |
140+
| `pnpm start:staging` | <https://staging-crates-io.herokuapp.com> | Testing UI changes with a smaller set of realistic data |
141+
| `pnpm start:local` | Backend server running locally | See the Working on the backend section for setup |
142+
| `pnpm start -- --proxy https://crates.io` | Whatever is specified in `--proxy` arg | If your use case is not covered here |
149143

150144
#### Running the frontend tests
151145

e2e/fixtures/mirage.ts

-175
This file was deleted.

e2e/helper.ts

-10
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { db, handlers } from '@crates-io/msw';
55

66
import * as pwFakeTimers from '@sinonjs/fake-timers';
77
import { FakeTimers, FakeTimersOptions } from './fixtures/fake-timers';
8-
import { MiragePage } from './fixtures/mirage';
98
import { PercyPage } from './fixtures/percy';
109
import { A11yPage } from './fixtures/a11y';
1110
import { EmberPage, EmberPageOptions } from './fixtures/ember';
@@ -17,7 +16,6 @@ export type AppOptions = {
1716
};
1817
export interface AppFixtures {
1918
clock: FakeTimers;
20-
mirage: MiragePage;
2119
msw: {
2220
worker: MockServiceWorker;
2321
db: typeof db;
@@ -53,14 +51,6 @@ export const test = base.extend<AppOptions & AppFixtures>({
5351
},
5452
{ auto: true, scope: 'test' },
5553
],
56-
mirage: [
57-
async ({ page }, use) => {
58-
let mirage = new MiragePage(page);
59-
await mirage.setup();
60-
await use(mirage);
61-
},
62-
{ scope: 'test' },
63-
],
6454
// MockServiceWorker integration via `playwright-msw`.
6555
//
6656
// We are explicitly not using the `createWorkerFixture()`function, because

mirage/config.js

-59
This file was deleted.

mirage/factories/api-token.js

-21
This file was deleted.

0 commit comments

Comments
 (0)