Skip to content

Commit

Permalink
Directly call client / servers under test with tsx
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Stamm <ts@timostamm.de>
  • Loading branch information
timostamm committed Aug 30, 2024
1 parent 167723a commit 462c356
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 26 deletions.
2 changes: 0 additions & 2 deletions packages/connect-cloudflare/conformance/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 0 additions & 2 deletions packages/connect-cloudflare/conformance/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
4 changes: 2 additions & 2 deletions packages/connect-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"private": true,
"type": "module",
"scripts": {
"conformance:server": "npx wrangler deploy -c ./conformance/wrangler-server.toml && connectconformance --mode server --conf ./conformance/conformance-cloudflare-server.yaml -v ./conformance/server.ts",
"conformance:client": "npx wrangler deploy -c ./conformance/wrangler-client.toml && connectconformance --mode client --conf ./conformance/conformance-cloudflare-client.yaml -v --known-failing @./conformance/known-failing-client.txt --bind 0.0.0.0 --port 8181 --cert $CLOUDFLARE_WORKERS_REFERENCE_SERVER_CERT --key $CLOUDFLARE_WORKERS_REFERENCE_SERVER_KEY -- ./conformance/client.ts",
"conformance:server": "npx wrangler deploy -c ./conformance/wrangler-server.toml && connectconformance --mode server --conf ./conformance/conformance-cloudflare-server.yaml -v tsx ./conformance/server.ts",
"conformance:client": "npx wrangler deploy -c ./conformance/wrangler-client.toml && connectconformance --mode client --conf ./conformance/conformance-cloudflare-client.yaml -v --known-failing @./conformance/known-failing-client.txt --bind 0.0.0.0 --port 8181 --cert $CLOUDFLARE_WORKERS_REFERENCE_SERVER_CERT --key $CLOUDFLARE_WORKERS_REFERENCE_SERVER_KEY -- tsx ./conformance/client.ts",
"format": "prettier --write --ignore-unknown '.'",
"license-header": "license-header",
"lint": "eslint --max-warnings 0 ."
Expand Down
2 changes: 0 additions & 2 deletions packages/connect-express/conformance/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"test": "jasmine --config=jasmine.json",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-express.yaml -v ./conformance/server.ts",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-express.yaml -v -- tsx ./conformance/server.ts",
"format": "prettier --write --ignore-unknown '.' '!dist'",
"license-header": "license-header",
"lint": "eslint --max-warnings 0 .",
Expand Down
2 changes: 0 additions & 2 deletions packages/connect-fastify/conformance/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-fastify.yaml -v ./conformance/server.ts",
"conformance": "tsc --noEmit && connectconformance --mode server --conf ./conformance/conformance-fastify.yaml -v -- tsx ./conformance/server.ts",
"format": "prettier --write --ignore-unknown '.' '!dist'",
"license-header": "license-header",
"lint": "eslint --max-warnings 0 .",
Expand Down
2 changes: 0 additions & 2 deletions packages/connect-node/conformance/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 0 additions & 2 deletions packages/connect-node/conformance/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
2 changes: 0 additions & 2 deletions packages/connect-web/conformance/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S npx tsx

// Copyright 2021-2024 The Connect Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
16 changes: 8 additions & 8 deletions packages/connect-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"build:cjs": "tsc --project tsconfig.build.json --module commonjs --verbatimModuleSyntax false --moduleResolution node10 --outDir ./dist/cjs --declaration --declarationDir ./dist/cjs && echo >./dist/cjs/package.json '{\"type\":\"commonjs\"}'",
"build:esm": "tsc --project tsconfig.build.json --outDir ./dist/esm --declaration --declarationDir ./dist/esm",
"conformance:client:safari": "npm run conformance:client:safari:promise && npm run conformance:client:safari:callback",
"conformance:client:safari:promise": "connectconformance --mode client --conf ./conformance/conformance-web.yaml -- ./conformance/client.ts --browser safari",
"conformance:client:safari:callback": "connectconformance --mode client --conf ./conformance/conformance-web.yaml --known-failing @./conformance/known-failing-callback-client.txt -- ./conformance/client.ts --browser safari --useCallbackClient",
"conformance:client:chrome:promise": "connectconformance --mode client --conf ./conformance/conformance-web.yaml -- ./conformance/client.ts --browser chrome",
"conformance:client:chrome:callback": "connectconformance --mode client --conf ./conformance/conformance-web.yaml --known-failing @./conformance/known-failing-callback-client.txt -- ./conformance/client.ts --browser chrome --useCallbackClient",
"conformance:client:firefox:promise": "connectconformance --mode client --conf ./conformance/conformance-web.yaml -- ./conformance/client.ts --browser firefox",
"conformance:client:firefox:callback": "connectconformance --mode client --conf ./conformance/conformance-web.yaml --known-failing @./conformance/known-failing-callback-client.txt -- ./conformance/client.ts --browser firefox --useCallbackClient",
"conformance:client:node:promise": "connectconformance --mode client --conf ./conformance/conformance-web-node.yaml -- ./conformance/client.ts --browser node",
"conformance:client:node:callback": "connectconformance --mode client --conf ./conformance/conformance-web-node.yaml --known-failing @./conformance/known-failing-callback-client.txt -- ./conformance/client.ts --browser node --useCallbackClient",
"conformance:client:safari:promise": "connectconformance --mode client --conf ./conformance/conformance-web.yaml -- tsx ./conformance/client.ts --browser safari",
"conformance:client:safari:callback": "connectconformance --mode client --conf ./conformance/conformance-web.yaml --known-failing @./conformance/known-failing-callback-client.txt -- tsx ./conformance/client.ts --browser safari --useCallbackClient",
"conformance:client:chrome:promise": "connectconformance --mode client --conf ./conformance/conformance-web.yaml -- tsx ./conformance/client.ts --browser chrome",
"conformance:client:chrome:callback": "connectconformance --mode client --conf ./conformance/conformance-web.yaml --known-failing @./conformance/known-failing-callback-client.txt -- tsx ./conformance/client.ts --browser chrome --useCallbackClient",
"conformance:client:firefox:promise": "connectconformance --mode client --conf ./conformance/conformance-web.yaml -- tsx ./conformance/client.ts --browser firefox",
"conformance:client:firefox:callback": "connectconformance --mode client --conf ./conformance/conformance-web.yaml --known-failing @./conformance/known-failing-callback-client.txt -- tsx ./conformance/client.ts --browser firefox --useCallbackClient",
"conformance:client:node:promise": "connectconformance --mode client --conf ./conformance/conformance-web-node.yaml -- tsx ./conformance/client.ts --browser node",
"conformance:client:node:callback": "connectconformance --mode client --conf ./conformance/conformance-web-node.yaml --known-failing @./conformance/known-failing-callback-client.txt -- tsx ./conformance/client.ts --browser node --useCallbackClient",
"test": "jasmine --config=jasmine.json",
"generate": "buf generate --template browserstack/buf.gen.yaml",
"postgenerate": "license-header browserstack/gen",
Expand Down

0 comments on commit 462c356

Please sign in to comment.