Skip to content

Commit

Permalink
test: run vite e2e in development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Oct 31, 2024
1 parent 5c24c24 commit 71ba539
Show file tree
Hide file tree
Showing 21 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion clients/client-cognito-identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"generate:client": "node ../../scripts/generate-clients/single-service --solo cognito-identity",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
"main": "./dist-cjs/index.js",
Expand Down
1 change: 0 additions & 1 deletion clients/client-cognito-identity/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "happy-dom",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion clients/client-kinesis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"generate:client": "node ../../scripts/generate-clients/single-service --solo kinesis",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
"main": "./dist-cjs/index.js",
Expand Down
1 change: 0 additions & 1 deletion clients/client-kinesis/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
4 changes: 2 additions & 2 deletions clients/client-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"generate:client": "node ../../scripts/generate-clients/single-service --solo s3",
"test": "vitest run",
"test:watch": "vitest watch",
"test:e2e": "vitest run -c vitest.config.e2e.ts && yarn test:browser",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development && yarn test:browser",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts",
"test:browser": "node ./test/browser-build/esbuild && vitest run -c vitest.config.browser.ts",
"test:browser": "node ./test/browser-build/esbuild && vitest run -c vitest.config.browser.ts --mode development",
"test:browser:watch": "node ./test/browser-build/esbuild && vitest watch -c vitest.config.browser.ts"
},
"main": "./dist-cjs/index.js",
Expand Down
1 change: 0 additions & 1 deletion clients/client-s3/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export default defineConfig({
exclude: ["**/*.browser.e2e.spec.ts"],
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion clients/client-transcribe-streaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"generate:client": "node ../../scripts/generate-clients/single-service --solo transcribe-streaming",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
"main": "./dist-cjs/index.js",
Expand Down
1 change: 0 additions & 1 deletion clients/client-transcribe-streaming/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion lib/lib-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"test": "vitest run",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:watch": "vitest watch",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
Expand Down
1 change: 0 additions & 1 deletion lib/lib-dynamodb/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion lib/lib-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"test": "vitest run",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:watch": "vitest watch",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
Expand Down
1 change: 0 additions & 1 deletion lib/lib-storage/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion packages/ec2-metadata-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"test": "vitest run --passWithNoTests",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:watch": "vitest watch --passWithNoTests",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
Expand Down
1 change: 0 additions & 1 deletion packages/ec2-metadata-service/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion packages/middleware-sdk-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"test": "vitest run",
"test:integration": "vitest run -c vitest.config.integ.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"extract:docs": "api-extractor run --local",
"test:watch": "vitest watch",
"test:integration:watch": "vitest watch -c vitest.config.integ.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/middleware-sdk-s3/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
2 changes: 1 addition & 1 deletion packages/s3-presigned-post/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
"extract:docs": "api-extractor run --local",
"test": "vitest run",
"test:e2e": "vitest run -c vitest.config.e2e.ts",
"test:e2e": "vitest run -c vitest.config.e2e.ts --mode development",
"test:watch": "vitest watch",
"test:e2e:watch": "vitest watch -c vitest.config.e2e.ts"
},
Expand Down
1 change: 0 additions & 1 deletion packages/s3-presigned-post/vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ export default defineConfig({
test: {
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});
8 changes: 0 additions & 8 deletions scripts/turbo/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
// Build script to handle Turborepo build execution
const { spawnProcess } = require("../utils/spawn-process");
const path = require("path");
const { loadSharedConfigFiles } = require("@smithy/shared-ini-file-loader");

const runTurbo = async (task, args, { apiSecret, apiEndpoint, apiSignatureKey } = {}) => {
const command = ["turbo", "run", task, "--concurrency=100%", "--output-logs=hash-only"];
command.push(...args);
const turboRoot = path.join(__dirname, "..", "..");

const ini = await loadSharedConfigFiles();
const profileData = ini.configFile["sdk-integ-test"];
if (profileData) {
console.log("Setting AWS_PROFILE=sdk-integ-test");
process.env.AWS_PROFILE = "sdk-integ-test";
}

try {
return await spawnProcess("yarn", command, {
stdio: "inherit",
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/get-integ-test-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ exports.getIntegTestResources = async () => {

const cloudformation = new CloudFormationClient({
region,
logger: console,
});
const stackName = "SdkReleaseV3IntegTestResourcesStack";

Expand Down
1 change: 0 additions & 1 deletion vitest.config.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export default defineConfig({
exclude: ["node_modules", "**/*.browser.e2e.spec.ts"],
include: ["**/*.e2e.spec.ts"],
environment: "node",
env: process.env as Record<string, string>,
},
});

0 comments on commit 71ba539

Please sign in to comment.