Skip to content

Commit 16b7905

Browse files
committed
test(core): remove unused files, move reused mocks to testing-utils
1 parent d399583 commit 16b7905

17 files changed

+68
-112
lines changed

packages/core/docs/README.md

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

packages/core/src/lib/collect-and-persist.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { describe, vi } from 'vitest';
44
import { ReportFragment } from '@code-pushup/portal-client';
55
import { Report } from '@code-pushup/models';
66
import { minimalConfig } from '@code-pushup/models/testing';
7-
import { DEFAULT_TESTING_CLI_OPTIONS } from '../../test/constants';
87
import { collectAndPersistReports } from './collect-and-persist';
98

109
// This in needed to mock the API client used inside the upload function
@@ -28,7 +27,8 @@ describe('collectAndPersistReports', () => {
2827
it('should work', async () => {
2928
const cfg = minimalConfig(outputDir);
3029
await collectAndPersistReports({
31-
...DEFAULT_TESTING_CLI_OPTIONS,
30+
verbose: true,
31+
progress: false,
3232
...cfg,
3333
});
3434
const result = JSON.parse(readFileSync(reportPath()).toString()) as Report;

packages/core/src/lib/implementation/collect.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { describe, expect, it } from 'vitest';
22
import { reportSchema } from '@code-pushup/models';
33
import { minimalConfig } from '@code-pushup/models/testing';
4-
import { DEFAULT_TESTING_CLI_OPTIONS } from '../../../test/constants';
54
import { CollectOptions, collect } from './collect';
65

76
const baseOptions: CollectOptions = {
87
...minimalConfig(),
9-
...DEFAULT_TESTING_CLI_OPTIONS,
8+
verbose: true,
9+
progress: false,
1010
};
1111

1212
describe('collect', () => {

packages/core/src/lib/implementation/execute-plugin.integration.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
auditOutputsSchema,
99
} from '@code-pushup/models';
1010
import { auditReport, pluginConfig } from '@code-pushup/models/testing';
11-
import { DEFAULT_TESTING_CLI_OPTIONS } from '../../../test/constants';
1211
import {
1312
PluginOutputMissingAuditError,
1413
executePlugin,
@@ -28,7 +27,7 @@ invalidSlugPluginCfg.audits = [
2827
},
2928
];
3029

31-
const DEFAULT_OPTIONS = { progress: DEFAULT_TESTING_CLI_OPTIONS.progress };
30+
const DEFAULT_OPTIONS = { progress: false };
3231

3332
describe('executePlugin', () => {
3433
it('should execute valid plugin config', async () => {

packages/core/test/constants.ts

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

packages/core/test/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/core/test/invaid.config.mjs

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

packages/core/test/minimal.config.mjs

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

packages/core/test/types.ts

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

packages/core/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.base.json",
33
"compilerOptions": {
4-
"module": "commonjs",
4+
"module": "ESNext",
55
"forceConsistentCasingInFileNames": true,
66
"strict": true,
77
"noImplicitOverride": true,

0 commit comments

Comments
 (0)