Skip to content

Commit b2b23d7

Browse files
committed
test(cli-e2e): move helper functions, clean up tests and setup
1 parent 4cb188b commit b2b23d7

19 files changed

Lines changed: 164 additions & 235 deletions

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"onlyDependOnLibsWithTags": [
3434
"type:app",
3535
"type:feature",
36+
"type:util",
3637
"type:testing-util"
3738
]
3839
},

e2e/cli-e2e/.eslintrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": ["../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*", "code-pushup.config.ts"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx"],
7+
"parserOptions": {
8+
"project": ["e2e/cli-e2e/tsconfig.*?.json"]
9+
}
10+
}
11+
]
12+
}

e2e/cli-e2e/mocks/code-pushup.config.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

e2e/cli-e2e/mocks/code-pushup.config.mjs

Lines changed: 0 additions & 30 deletions
This file was deleted.

e2e/cli-e2e/mocks/code-pushup.config.ts

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import eslintPlugin from '@code-pushup/eslint-plugin';
2+
3+
export default {
4+
upload: {
5+
organization: 'code-pushup',
6+
project: 'cli-js',
7+
apiKey: 'e2e-api-key',
8+
server: 'https://e2e.com/api',
9+
},
10+
categories: [
11+
{
12+
slug: 'bug-prevention',
13+
title: 'Bug prevention',
14+
refs: [{ type: 'group', plugin: 'eslint', slug: 'problems', weight: 1 }],
15+
},
16+
{
17+
slug: 'code-style',
18+
title: 'Code style',
19+
refs: [
20+
{ type: 'group', plugin: 'eslint', slug: 'suggestions', weight: 1 },
21+
],
22+
},
23+
],
24+
plugins: [
25+
await eslintPlugin({ eslintrc: '.eslintrc.json', patterns: '**/*.ts' }),
26+
],
27+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import eslintPlugin from '@code-pushup/eslint-plugin';
2+
3+
export default {
4+
upload: {
5+
organization: 'code-pushup',
6+
project: 'cli-mjs',
7+
apiKey: 'e2e-api-key',
8+
server: 'https://e2e.com/api',
9+
},
10+
categories: [
11+
{
12+
slug: 'bug-prevention',
13+
title: 'Bug prevention',
14+
refs: [{ type: 'group', plugin: 'eslint', slug: 'problems', weight: 1 }],
15+
},
16+
{
17+
slug: 'code-style',
18+
title: 'Code style',
19+
refs: [
20+
{ type: 'group', plugin: 'eslint', slug: 'suggestions', weight: 1 },
21+
],
22+
},
23+
],
24+
plugins: [
25+
await eslintPlugin({ eslintrc: '.eslintrc.json', patterns: '**/*.ts' }),
26+
],
27+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import eslintPlugin from '@code-pushup/eslint-plugin';
2+
import { CoreConfig } from '@code-pushup/models';
3+
4+
export default {
5+
upload: {
6+
organization: 'code-pushup',
7+
project: 'cli-ts',
8+
apiKey: 'e2e-api-key',
9+
server: 'https://e2e.com/api',
10+
},
11+
categories: [
12+
{
13+
slug: 'bug-prevention',
14+
title: 'Bug prevention',
15+
refs: [{ type: 'group', plugin: 'eslint', slug: 'problems', weight: 1 }],
16+
},
17+
{
18+
slug: 'code-style',
19+
title: 'Code style',
20+
refs: [
21+
{ type: 'group', plugin: 'eslint', slug: 'suggestions', weight: 1 },
22+
],
23+
},
24+
],
25+
plugins: [
26+
await eslintPlugin({ eslintrc: '.eslintrc.json', patterns: '**/*.ts' }),
27+
],
28+
} satisfies CoreConfig;

e2e/cli-e2e/mocks/fs.mock.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

e2e/cli-e2e/mocks/utils.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)