diff --git a/.github/workflows/web_build_and_test.yml b/.github/workflows/web_build_and_test.yml index d80edfd80..e988f6406 100644 --- a/.github/workflows/web_build_and_test.yml +++ b/.github/workflows/web_build_and_test.yml @@ -18,11 +18,11 @@ on: push: branches: [ main ] paths: - - 'renderers/web_core/**/*' + - 'renderers/web_core/**' - '.github/workflows/web_build_and_test.yml' pull_request: paths: - - 'renderers/web_core/**/*' + - 'renderers/web_core/**' - '.github/workflows/web_build_and_test.yml' jobs: @@ -49,6 +49,8 @@ jobs: working-directory: ./renderers/web_core run: npm run test lint: + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v6 diff --git a/renderers/web_core/package.json b/renderers/web_core/package.json index ba3cb73ea..6756306e1 100644 --- a/renderers/web_core/package.json +++ b/renderers/web_core/package.json @@ -64,7 +64,7 @@ "build": "wireit", "build:tsc": "wireit", "test": "wireit", - "test:coverage": "c8 node --test \"dist/**/*.test.js\"", + "test:coverage": "c8 node --test dist/src/v0_8/*/*.test.js dist/src/v0_9/*/*.test.js dist/src/v0_9/*/*/*.test.js", "compile": "tsc", "lint": "gts lint", "fix": "gts fix" @@ -104,7 +104,7 @@ "clean": "if-file-deleted" }, "test": { - "command": "node --test dist", + "command": "node --test dist/src/v0_8/*/*.test.js dist/src/v0_9/*/*.test.js dist/src/v0_9/*/*/*.test.js", "dependencies": [ "build" ] diff --git a/renderers/web_core/src/v0_9/catalog/types.test.ts b/renderers/web_core/src/v0_9/catalog/types.test.ts index 1b6041f3c..d4044cc79 100644 --- a/renderers/web_core/src/v0_9/catalog/types.test.ts +++ b/renderers/web_core/src/v0_9/catalog/types.test.ts @@ -107,8 +107,8 @@ describe('InferredComponentApiSchemaType', () => { name: 'MockComp', schema: mockSchema, } satisfies ComponentApi; - // Appease typescript-eslint/no-unused-vars - type _ = typeof mockApi; + + assert.ok(mockApi); // Type-level equivalence assertion using z.infer type ExpectedType = z.infer; @@ -120,6 +120,7 @@ describe('InferredComponentApiSchemaType', () => { // This happens when `mockApi: ComponentApi`, but doesn't when // `mockApi {} satisfies ComponentApi`! const inferredIsAny: IsAny = false; + assert.strictEqual(inferredIsAny, false); // When types are not "any", check that they're the same by checking if they // extend each other. @@ -132,5 +133,6 @@ describe('InferredComponentApiSchemaType', () => { // typesMatchExact only accepts "true" if `TypesAreEquivalent` const typesMatchExact: TypesAreEquivalent = true; + assert.strictEqual(typesMatchExact, true); }); });