Skip to content

Commit 776e8db

Browse files
algolia-botmillotp
andcommitted
fix(cts): use vitest instead of jest (#3761) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent 57cab61 commit 776e8db

27 files changed

+41
-40
lines changed

tests/output/javascript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "javascript-tests",
33
"version": "1.0.0",
44
"scripts": {
5-
"test": "rm -rf dist || true && tsc && jest --passWithNoTests"
5+
"test": "tsc --noEmit && vitest run"
66
},
77
"dependencies": {
88
"@algolia/client-abtesting": "link:../../../clients/algoliasearch-client-javascript/packages/client-abtesting",
@@ -20,9 +20,9 @@
2020
},
2121
"devDependencies": {
2222
"@types/jest": "29.5.13",
23-
"@types/node": "22.5.1",
23+
"@types/node": "22.5.5",
2424
"dotenv": "16.4.5",
25-
"jest": "29.7.0",
26-
"typescript": "5.5.4"
25+
"typescript": "5.6.2",
26+
"vitest": "2.1.1"
2727
}
2828
}

tests/output/javascript/src/benchmark/search.test.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars */
3-
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4-
import type { SearchClient } from '@algolia/client-search';
53
import { searchClient } from '@algolia/client-search';
6-
7-
const appId = 'test-app-id';
8-
const apiKey = 'test-api-key';
9-
10-
function createClient(): SearchClient {
11-
return searchClient(appId, apiKey, { requester: nodeEchoRequester() });
12-
}
4+
import { describe, test } from 'vitest';
135

146
describe('benchmark', () => {
157
test('benchmark the search method', async () => {

tests/output/javascript/src/client/abtesting.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { AbtestingClient } from '@algolia/client-abtesting';
56
import { abtestingClient } from '@algolia/client-abtesting';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/analytics.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { AnalyticsClient } from '@algolia/client-analytics';
56
import { analyticsClient } from '@algolia/client-analytics';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/ingestion.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { IngestionClient } from '@algolia/ingestion';
56
import { ingestionClient } from '@algolia/ingestion';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/insights.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { InsightsClient } from '@algolia/client-insights';
56
import { insightsClient } from '@algolia/client-insights';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/monitoring.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { MonitoringClient } from '@algolia/monitoring';
56
import { monitoringClient } from '@algolia/monitoring';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/personalization.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { PersonalizationClient } from '@algolia/client-personalization';
56
import { personalizationClient } from '@algolia/client-personalization';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/querySuggestions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable @typescript-eslint/no-unused-vars, require-await, no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';
56
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

tests/output/javascript/src/client/recommend.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
22
/* eslint-disable no-lone-blocks */
33
// @ts-nocheck Failing tests will have type errors, but we cannot suppress them even with @ts-expect-error because it doesn't work for a block of lines.
4+
45
import type { RecommendClient } from '@algolia/recommend';
56
import { recommendClient } from '@algolia/recommend';
67
import { nodeEchoRequester } from '@algolia/requester-testing';
78
import type { EchoResponse } from '@algolia/requester-testing';
9+
import { describe, test, expect } from 'vitest';
810

911
const appId = 'test-app-id';
1012
const apiKey = 'test-api-key';

0 commit comments

Comments
 (0)