Merge branch 'origin/main' into codex/issue-386
This commit is contained in:
@@ -13,6 +13,8 @@ describe("package identity", () => {
|
||||
bin: z.record(z.string(), z.string()),
|
||||
scripts: z.object({
|
||||
start: z.string(),
|
||||
"metadata:check": z.string(),
|
||||
prebuild: z.string(),
|
||||
prepare: z.string(),
|
||||
prepack: z.string(),
|
||||
prepublishOnly: z.string(),
|
||||
@@ -41,10 +43,14 @@ describe("package identity", () => {
|
||||
`npx -y ${packageJson.name}@${PRODUCT_IDENTITY.packageVersion} mcp`,
|
||||
);
|
||||
expect(packageJson.scripts.start).toBe("node scripts/rea.mjs mcp");
|
||||
expect(packageJson.scripts.prepare).toBe("npm run build && husky");
|
||||
expect(packageJson.scripts.prepack).toBe(
|
||||
"npm run deps:check && node scripts/generate-skill-metadata.mjs --check",
|
||||
expect(packageJson.scripts["metadata:check"]).toBe(
|
||||
"node scripts/generate-package-metadata.mjs --check",
|
||||
);
|
||||
expect(packageJson.scripts.prebuild).toBe(
|
||||
"npm run deps:check && npm run metadata:check",
|
||||
);
|
||||
expect(packageJson.scripts.prepare).toBe("node scripts/prepare.mjs");
|
||||
expect(packageJson.scripts.prepack).toBe("node scripts/prepack.mjs");
|
||||
expect(packageJson.scripts.prepublishOnly).toBe(
|
||||
"npm run deps:check && node scripts/generate-skill-metadata.mjs --check",
|
||||
);
|
||||
|
||||
@@ -18,6 +18,12 @@ describe("package installation workflows", () => {
|
||||
|
||||
expect(continuousIntegration).toContain("os: [ubuntu-latest, macos-14]");
|
||||
expect(continuousIntegration).toContain("npm run verify:package");
|
||||
expect(continuousIntegration).toContain("name: Static checks");
|
||||
expect(continuousIntegration).toContain("npm run check:ci");
|
||||
expect(continuousIntegration).toContain("needs: changes");
|
||||
expect(continuousIntegration).toContain(
|
||||
"cancel-in-progress: ${{ github.event_name == 'pull_request' }}",
|
||||
);
|
||||
for (const workflow of [
|
||||
continuousIntegration,
|
||||
realHopperLinux,
|
||||
|
||||
@@ -61,9 +61,10 @@ describe("release configuration", () => {
|
||||
expect(generated).toContain("x-release-please-version");
|
||||
});
|
||||
|
||||
it("does not make all TypeDoc output release-version dependent", async () => {
|
||||
it("keeps TypeDoc unversioned and outside the tracked documentation tree", async () => {
|
||||
await expect(readJson("typedoc.json")).resolves.toMatchObject({
|
||||
includeVersion: false,
|
||||
out: "build/api-docs",
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,15 +1,29 @@
|
||||
import { execFile } from "node:child_process";
|
||||
import { readdir } from "node:fs/promises";
|
||||
import { availableParallelism } from "node:os";
|
||||
import { join, resolve } from "node:path";
|
||||
import { promisify } from "node:util";
|
||||
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { SERIAL_INTEGRATION_TESTS } from "../vitest.config.js";
|
||||
import vitestConfiguration, {
|
||||
SERIAL_INTEGRATION_TESTS,
|
||||
} from "../vitest.config.js";
|
||||
|
||||
const execute = promisify(execFile);
|
||||
|
||||
describe("Vitest project configuration", () => {
|
||||
it("keeps coverage and noisy reporting out of the local test loop", () => {
|
||||
const continuousIntegration = process.env.CI === "true";
|
||||
|
||||
expect(vitestConfiguration.test?.coverage?.enabled).toBe(false);
|
||||
expect(vitestConfiguration.test?.reporters).toEqual(["default"]);
|
||||
expect(vitestConfiguration.test?.retry).toBe(continuousIntegration ? 2 : 0);
|
||||
expect(vitestConfiguration.test?.maxWorkers).toBe(
|
||||
Math.min(2, availableParallelism()),
|
||||
);
|
||||
});
|
||||
|
||||
it("collects exact disjoint parallel and serial test sets", async () => {
|
||||
const { stdout } = await execute(
|
||||
process.execPath,
|
||||
|
||||
Reference in New Issue
Block a user