Skip to content

Commit 6a53054

Browse files
committed
update perf, e2e, unit tests setup
1 parent 36994aa commit 6a53054

3 files changed

Lines changed: 28 additions & 11 deletions

File tree

packages/cli/src/commands/split/__tests__/index.test.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import * as utils from '../../../utils/miscellaneous.js';
88
import { configFixture } from '../../../__tests__/fixtures/config.js';
99

1010
describe('split', () => {
11-
const openapiDir = 'test';
11+
const openapiDir = 'output/split-test';
1212
const componentsFiles: ComponentsFiles = {};
1313

1414
beforeEach(() => {
@@ -97,7 +97,10 @@ describe('split', () => {
9797
);
9898

9999
expect(openapiCore.slash).toHaveBeenCalledWith('paths/test.yaml');
100-
expect(path.relative).toHaveBeenCalledWith('test', 'test/paths/test.yaml');
100+
expect(path.relative).toHaveBeenCalledWith(
101+
'output/split-test',
102+
'output/split-test/paths/test.yaml'
103+
);
101104
});
102105

103106
it('should have correct path with webhooks', () => {
@@ -116,7 +119,10 @@ describe('split', () => {
116119
);
117120

118121
expect(openapiCore.slash).toHaveBeenCalledWith('webhooks/test.yaml');
119-
expect(path.relative).toHaveBeenCalledWith('test', 'test/webhooks/test.yaml');
122+
expect(path.relative).toHaveBeenCalledWith(
123+
'output/split-test',
124+
'output/split-test/webhooks/test.yaml'
125+
);
120126
});
121127

122128
it('should have correct path with x-webhooks', () => {
@@ -135,7 +141,10 @@ describe('split', () => {
135141
);
136142

137143
expect(openapiCore.slash).toHaveBeenCalledWith('webhooks/test.yaml');
138-
expect(path.relative).toHaveBeenCalledWith('test', 'test/webhooks/test.yaml');
144+
expect(path.relative).toHaveBeenCalledWith(
145+
'output/split-test',
146+
'output/split-test/webhooks/test.yaml'
147+
);
139148
});
140149

141150
it('should create correct folder name for code samples', async () => {

tests/performance/package.json

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,20 @@
88
"make-test": "bash make-test-command.sh"
99
},
1010
"dependencies": {
11-
"cli-next-1": "npm:@redocly/cli@2.0.0-next.1",
12-
"cli-next-7": "npm:@redocly/cli@2.0.0-next.7",
13-
"cli-next-8": "npm:@redocly/cli@2.0.0-next.8",
14-
"cli-next-9": "npm:@redocly/cli@2.0.0-next.9",
11+
"cli-2-next-1": "npm:@redocly/cli@2.0.0-next.1",
12+
"cli-2-next-7": "npm:@redocly/cli@2.0.0-next.7",
13+
"cli-2-next-8": "npm:@redocly/cli@2.0.0-next.8",
14+
"cli-2-next-9": "npm:@redocly/cli@2.0.0-next.9",
1515
"cli-2.0.0": "npm:@redocly/cli@2.0.0",
16-
"cli-next": "file:../redocly-cli.tgz"
16+
"cli-2.0.8": "npm:@redocly/cli@2.0.8",
17+
"cli-2.1.5": "npm:@redocly/cli@2.1.5",
18+
"cli-2.2.3": "npm:@redocly/cli@2.2.3",
19+
"cli-2.3.1": "npm:@redocly/cli@2.3.1",
20+
"cli-2.4.0": "npm:@redocly/cli@2.4.0",
21+
"cli-2.5.1": "npm:@redocly/cli@2.5.1",
22+
"cli-2.6.0": "npm:@redocly/cli@2.6.0",
23+
"cli-2.7.1": "npm:@redocly/cli@2.7.1",
24+
"cli-2.8.0": "npm:@redocly/cli@2.8.0",
25+
"cli-next": "file:../../redocly-cli.tgz"
1726
}
1827
}

vitest.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ const configExtension: { [key: string]: ViteUserConfig } = {
1616
provider: 'istanbul',
1717
exclude: [
1818
'packages/**/__tests__/**/*',
19-
'packages/core/src/benchmark/**/*',
2019
'packages/cli/src/index.ts',
2120
'packages/cli/src/utils/assert-node-version.ts',
2221
],
@@ -31,7 +30,7 @@ const configExtension: { [key: string]: ViteUserConfig } = {
3130
}),
3231
e2e: defineConfig({
3332
test: {
34-
include: ['tests/e2e/__tests__/respect/**/*.test.ts', 'tests/e2e/__tests__/commands.test.ts'],
33+
include: ['tests/e2e/__tests__/**/*.test.ts'],
3534
},
3635
}),
3736
'smoke-rebilly': defineConfig({

0 commit comments

Comments
 (0)