Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
run: |
pip install codespell==2.1.0
# codespell considers some repo name in go.sum are misspelled
git grep --cached -l '' | grep -v go.sum | grep -v pnpm-lock.yaml |xargs codespell --ignore-words=.ignore_words --skip="*.ts,*.mts"
git grep --cached -l '' | grep -v go.sum | grep -v pnpm-lock.yaml |xargs codespell --ignore-words=.ignore_words --skip="*.ts"
- name: Merge conflict
run: |
bash ./utils/check-merge-conflict.sh
Expand Down
2 changes: 1 addition & 1 deletion ci/linux_apisix_current_luarocks_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ do_install() {
# install nodejs
install_nodejs

# install common jest test suite
# install common node test suite
pushd t
pnpm install
popd
Expand Down
2 changes: 1 addition & 1 deletion ci/linux_openresty_common_runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ do_install() {
# install nodejs
install_nodejs

# install common jest test suite
# install common node test suite
pushd t
pnpm install
popd
Expand Down
4 changes: 2 additions & 2 deletions t/admin/metadata.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ __DATA__
--- timeout: 15
--- max_size: 204800
--- exec
cd t && pnpm test admin/metadata.spec.ts 2>&1
cd t && pnpm test --no-color admin/metadata.spec.ts 2>&1
--- no_error_log
failed to execute the script with status
--- response_body eval
qr/PASS admin\/metadata.spec.ts/
qr/Test Files\s+1 passed \(1\)/
4 changes: 2 additions & 2 deletions t/admin/standalone.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ __DATA__
--- timeout: 15
--- max_size: 204800
--- exec
cd t && pnpm test admin/standalone.spec.ts 2>&1
cd t && pnpm test --no-color admin/standalone.spec.ts 2>&1
--- no_error_log
failed to execute the script with status
--- response_body eval
qr/PASS admin\/standalone.spec.ts/
qr/Test Files\s+1 passed \(1\)/



Expand Down
2 changes: 1 addition & 1 deletion t/cli/test_mcp_bridge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ sleep 1

# run the mcp client test
pushd t
if ! timeout 60 pnpm test plugin/mcp-bridge.spec.mts 2>&1; then
if ! timeout 60 pnpm test plugin/mcp-bridge.spec.ts 2>&1; then
echo "failed: mcp-bridge client test failed"
popd
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { describe, expect, it, jest } from '@jest/globals';
import axios from 'axios';
import { readFileSync } from 'node:fs';
import { type IncomingHttpHeaders, request } from 'node:http';
Expand All @@ -24,10 +23,10 @@ import { request as requestAdminAPI } from '../ts/admin_api';
import { wait } from '../ts/utils';

// Every test here does at least one real websocket handshake plus etcd sync
// round trip, which the shared 5s Jest default leaves little room for on a
// round trip, which the shared 5s default leaves little room for on a
// loaded machine; the handful of tests that need more than this still set
// their own per-test timeout on top of it.
jest.setTimeout(15000);
vi.setConfig({ testTimeout: 15000 });

const PROXY_BASE = 'ws://localhost:1984';
// a loopback address nothing listens on, used as an unreachable upstream node
Expand Down
4 changes: 2 additions & 2 deletions t/node/websocket-proxy.t
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ __DATA__
--- timeout: 60
--- max_size: 2048000
--- exec
cd t && pnpm test node/websocket-proxy.spec.mts 2>&1
cd t && pnpm test --no-color node/websocket-proxy.spec.ts 2>&1
--- error_log
plugin ws_handshake phase
plugin ws_close phase
ws request_type: websocket
--- no_error_log
failed to execute the script with status
--- response_body eval
qr/PASS node\/websocket-proxy.spec.mts/
qr/Test Files\s+1 passed \(1\)/
8 changes: 2 additions & 6 deletions t/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
"private": true,
"type": "module",
"scripts": {
"test": "NODE_OPTIONS=--experimental-vm-modules jest --verbose"
"test": "vitest run --reporter=verbose"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@modelcontextprotocol/sdk": "1.26.0",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
"@types/google-protobuf": "^3.15.12",
"@types/jest": "29.5.14",
"@types/node": "22.14.1",
"@types/ws": "^8.18.1",
"axios": "^1.16.0",
Expand All @@ -19,11 +17,9 @@
"graphql": "^16.11.0",
"graphql-request": "^7.1.2",
"grpc-web": "^1.5.0",
"jest": "29.7.0",
"lago-javascript-client": "^1.26.0",
"simple-git": "^3.27.0",
"ts-jest": "29.3.2",
"ts-node": "10.9.2",
"vitest": "^5.0.2",
"ws": "^8.21.3",
"xhr2": "^0.2.1",
"yaml": "^2.7.1"
Expand Down
1 change: 0 additions & 1 deletion t/plugin/lago.spec.mts → t/plugin/lago.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { existsSync } from 'node:fs';
import { readFile, rm, writeFile } from 'node:fs/promises';
import { promisify } from 'node:util';

import { afterAll, beforeAll, describe, expect, it, jest } from '@jest/globals';
import axios from 'axios';
import * as compose from 'docker-compose';
import { gql, request } from 'graphql-request';
Expand Down
4 changes: 2 additions & 2 deletions t/plugin/lago.t
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ property "event_properties" validation failed: wrong type: expected object, got
--- timeout: 302
--- max_size: 2048000
--- exec
cd t && pnpm test plugin/lago.spec.mts 2>&1
cd t && pnpm test --no-color plugin/lago.spec.ts 2>&1
--- no_error_log
failed to execute the script with status
--- response_body eval
qr/PASS plugin\/lago.spec.mts/
qr/Test Files\s+1 passed \(1\)/
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* the point, now that the protocol layer is our own Lua rather than the SDK's
* server half.
*/
import { afterEach, describe, expect, it } from '@jest/globals';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
Expand Down
4 changes: 2 additions & 2 deletions t/plugin/openapi-to-mcp-interop.t
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ passed
--- timeout: 300
--- max_size: 2048000
--- exec
cd t && pnpm test plugin/openapi-to-mcp-interop.spec.mts 2>&1
cd t && pnpm test --no-color plugin/openapi-to-mcp-interop.spec.ts 2>&1
--- no_error_log
failed to execute the script with status
--- response_body eval
qr/Tests:\s+(\d+) passed, \1 total/
qr/Tests\s+(\d+) passed \(\1\)/



Expand Down
Loading
Loading