Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-tool] Update migration tool for ARM scripts #32542

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
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
27 changes: 15 additions & 12 deletions common/tools/dev-tool/src/commands/admin/migrate-package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,18 @@ const VITEST_CONFIG = `
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { defineConfig, mergeConfig } from "vitest/config";
import viteConfig from "../../../vitest.shared.config.ts";

export default viteConfig;
export default mergeConfig(
viteConfig,
defineConfig({
test: {
testTimeout: 1200000,
hookTimeout: 1200000,
},
}),
);
`;

const VITEST_BROWSER_CONFIG = `
Expand All @@ -166,9 +175,9 @@ export default mergeConfig(
viteConfig,
defineConfig({
test: {
include: [
"dist-test/browser/test/**/*.spec.js",
],
include: ["dist-test/browser/test/**/*.spec.js",],
testTimeout: 1200000,
hookTimeout: 1200000,
},
}),
);
Expand All @@ -190,14 +199,7 @@ export default mergeConfig(

async function writeBrowserTestConfig(packageFolder: string): Promise<void> {
const testConfig = {
extends: "./.tshy/build.json",
include: ["./src/**/*.ts", "./src/**/*.mts", "./test/**/*.spec.ts", "./test/**/*.mts"],
exclude: ["./test/**/node/**/*.ts"],
compilerOptions: {
outDir: "./dist-test/browser",
rootDir: ".",
skipLibCheck: true,
},
extends: ["./tsconfig.test.json", "../../../tsconfig.browser.base.json"],
};

await saveJson(resolve(packageFolder, "tsconfig.browser.config.json"), testConfig);
Expand Down Expand Up @@ -340,6 +342,7 @@ function setScriptsSection(
scripts["unit-test:node"] = "dev-tool run test:vitest";

if (options.isArm) {
scripts["unit-test:browser"] = "echo skipped";
scripts["integration-test:node"] = "dev-tool run test:vitest --esm";
}

Expand Down
Loading