Skip to content

Commit 5be4980

Browse files
committed
Merge branch 'main' into chore/run-nx-with-tsx
2 parents d73b906 + dd6e35e commit 5be4980

39 files changed

+1162
-968
lines changed

eslint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export default tseslint.config(
139139
{
140140
ignores: [
141141
'**/*.mock.*',
142+
'**/*.setup-file.*',
142143
'**/code-pushup.config.ts',
143144
'**/mocks/fixtures/**',
144145
'**/__snapshots__/**',
File renamed without changes.

nx.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
"!{workspaceRoot}/**/.code-pushup/**/*",
1515
"!{projectRoot}/code-pushup.config.?(m)[jt]s",
1616
"!{projectRoot}/code-pushup.config.bundled_*.mjs",
17-
"!{projectRoot}/@(test|mocks|mock)/**/*",
17+
"!{projectRoot}/@(test|mocks)/**/*",
1818
"!{projectRoot}/**/?(*.)test.[jt]s?(x)?(.snap)",
19-
"!{projectRoot}/**/?(*.)mocks.[jt]s?(x)",
2019
"!{projectRoot}/**/?(*.)mock.[jt]s?(x)",
2120
"!{projectRoot}/vitest.@(unit|int|e2e).config.[jt]s",
2221
"!{projectRoot}/dist/**/*",
File renamed without changes.

packages/nx-plugin/src/executors/cli/utils.int.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { UploadConfig } from '@code-pushup/models';
2-
import { normalizedExecutorContext } from '../../../mock/utils/executor.js';
2+
import { normalizedExecutorContext } from '../../../mocks/utils/executor.js';
33
import * as config from '../internal/config.js';
44
import { parseCliExecutorOptions } from './utils.js';
55

packages/nx-plugin/src/executors/internal/config.int.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ENV } from '../../../mock/fixtures/env.js';
1+
import { ENV } from '../../../mocks/fixtures/env.js';
22
import { uploadConfig } from './config.js';
33
import * as env from './env.js';
44

packages/nx-plugin/src/executors/internal/config.unit.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { MockInstance } from 'vitest';
22
import { osAgnosticPath } from '@code-pushup/test-utils';
3-
import { ENV } from '../../../mock/fixtures/env.js';
3+
import { ENV } from '../../../mocks/fixtures/env.js';
44
import { globalConfig, persistConfig, uploadConfig } from './config.js';
55

66
describe('globalConfig', () => {

packages/nx-plugin/tsconfig.test.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"include": [
88
"vitest.unit.config.ts",
99
"vitest.int.config.ts",
10-
"mock/**/*.ts",
10+
"mocks/**/*.ts",
1111
"src/**/*.test.ts",
1212
"src/**/*.test.tsx",
1313
"src/**/*.test.js",

packages/plugin-lighthouse/CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To test lighthouse properly we work with a predefined testing setup.
1515

1616
On some OS there could be a problem finding the path to Chrome.
1717

18-
We try to detect it automatically in the [`chrome-path.mock.ts` script](../../testing/test-setup/src/lib/chrome-path.mock.ts).
18+
We try to detect it automatically in the [`chrome-path.setup-file.ts` script](../../testing/test-setup/src/lib/chrome-path.setup-file.ts).
1919
There we use `getChromePath` and have `chromium` installed as NPM package, so detecting the path should not cause any problem.
2020

2121
However, if no chrome path is detected automatically the error looks like this:
@@ -46,7 +46,7 @@ In the CI you can set a static path if needed over the env variable like this:
4646
# ...
4747
```
4848

49-
We consider this path in our `beforeAll` hook in a [`chrome-path.mock.ts` script](../../testing/test-setup/src/lib/chrome-path.mock.ts).
49+
We consider this path in our `beforeAll` hook in a [`chrome-path.setup-file.ts` script](../../testing/test-setup/src/lib/chrome-path.setup-file.ts).
5050

5151
### Testing chrome flags
5252

@@ -66,15 +66,15 @@ For a full list of available flags check out [this document](https://peter.sh/ex
6666

6767
### Chrome User Data
6868

69-
To bootstrap Chrome with a predefined for setting we have to provide a couple of config files that we located under `<project-root>/mock/chromium-user-data`.
69+
To bootstrap Chrome with a predefined for setting we have to provide a couple of config files that we located under `<project-root>/mocks/chromium-user-data`.
7070
When executing Lighthouse we provide the path to this folder over the `Flag` object.
7171

7272
To generate initialise or edit the file structure under `chromium-user-data` do the following steps:
7373

74-
1. Spin up Chrome by running `npx chrome-debug --user-data-dir=./packages/plugin-lighthouse/mock/chromium-user-data`
74+
1. Spin up Chrome by running `npx chrome-debug --user-data-dir=./packages/plugin-lighthouse/mocks/chromium-user-data`
7575
<img width="1202" alt="chrome-blank-screen" src="./docs/images/chrome-blank-screen.png">
7676

77-
2. If you do this the first time you should already see content under `<project-root>/mock/chromium-user-data`
77+
2. If you do this the first time you should already see content under `<project-root>/mocks/chromium-user-data`
7878
3. Edit the configuration over the Chrome UI. E.g. adding a profile
7979
4. Close chromium and open it again, and you should see chromium bootstraps as the configured user
8080
<img width="1202" alt="chrome-blank-screen-pre-configured" src="./docs/images/chrome-blank-screen-pre-configure.png">

0 commit comments

Comments
 (0)