Skip to content

Commit 68dc734

Browse files
committed
fix(cts): use node test runner instead of jest
1 parent 2981275 commit 68dc734

File tree

22 files changed

+300
-3398
lines changed

22 files changed

+300
-3398
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ jobs:
289289
path: clients-javascript.zip
290290

291291
client_gen:
292-
timeout-minutes: 10
292+
timeout-minutes: 15
293293
runs-on: ubuntu-22.04
294294
needs:
295295
- setup
@@ -400,7 +400,7 @@ jobs:
400400
path: clients-${{matrix.client.language }}.zip
401401

402402
kotlin_build_macos:
403-
timeout-minutes: 10
403+
timeout-minutes: 15
404404
runs-on: macos-latest
405405
needs:
406406
- setup

playground/javascript/node/abtesting.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { abtestingClient } from '@algolia/client-abtesting';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey =

playground/javascript/node/algoliasearch.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import { algoliasearch, SearchClient } from 'algoliasearch';
22
import { liteClient } from 'algoliasearch/lite';
33
import { ApiError } from '@algolia/client-common';
4-
import dotenv from 'dotenv';
54

65
import type { SearchResponses } from 'algoliasearch';
76

8-
dotenv.config({ path: '../../.env' });
9-
107
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
118
const apiKey = process.env.ALGOLIA_SEARCH_KEY || '**** SEARCH_API_KEY *****';
129

playground/javascript/node/analytics.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { analyticsClient } from '@algolia/client-analytics';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey =

playground/javascript/node/ingestion.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { ingestionClient } from '@algolia/ingestion';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey =

playground/javascript/node/insights.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { insightsClient } from '@algolia/client-insights';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey =

playground/javascript/node/package.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44
"private": true,
55
"type": "module",
66
"scripts": {
7-
"start:algoliasearch": "tsc && node dist/algoliasearch.js",
8-
"start:abtesting": "tsc && node dist/abtesting.js",
9-
"start:analytics": "tsc && node dist/analytics.js",
10-
"start:insights": "tsc && node dist/insights.js",
11-
"start:personalization": "tsc && node dist/personalization.js",
12-
"start:query-suggestions": "tsc && node dist/query-suggestions.js",
13-
"start:recommend": "tsc && node dist/recommend.js",
14-
"start:search": "tsc && node dist/search.js",
15-
"start:sources": "tsc && node dist/sources.js",
7+
"start": "tsc && node --env-file=../../.env dist/$0.js",
168
"build": "tsc"
179
},
1810
"dependencies": {
@@ -29,11 +21,10 @@
2921
"algoliasearch": "link:../../../clients/algoliasearch-client-javascript/packages/algoliasearch"
3022
},
3123
"devDependencies": {
32-
"dotenv": "16.4.5",
3324
"typescript": "5.6.2"
3425
},
3526
"engines": {
36-
"node": ">= 14.0.0",
27+
"node": ">= 20.0.0",
3728
"yarn": "^4.0.0"
3829
}
3930
}

playground/javascript/node/personalization.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { personalizationClient } from '@algolia/client-personalization';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey =

playground/javascript/node/query-suggestions.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { querySuggestionsClient } from '@algolia/client-query-suggestions';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey =

playground/javascript/node/recommend.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import { recommendClient } from '@algolia/recommend';
22
import { ApiError } from '@algolia/client-common';
3-
import dotenv from 'dotenv';
4-
5-
dotenv.config({ path: '../../.env' });
63

74
const appId = process.env.ALGOLIA_APPLICATION_ID || '**** APP_ID *****';
85
const apiKey = process.env.ALGOLIA_SEARCH_KEY || '**** SEARCH_API_KEY *****';

0 commit comments

Comments
 (0)