diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2025-11-08 17:30:19 -0800 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2025-11-08 17:32:01 -0800 |
| commit | 8442ed67628e5d51e02b876d0f27479f9215bf0a (patch) | |
| tree | e63c4afce5c29bb2e1edbf5899291508e211d1fe /tests | |
| parent | b32604eef0cec59798cdfea53b82766819429717 (diff) | |
add more tests, fix issues, add support for booleans
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/type-consistency/spec/index.ts | 3 | ||||
| -rw-r--r-- | tests/type-consistency/spec/types.ts | 22 | ||||
| -rw-r--r-- | tests/type-consistency/tsconfig.json | 15 |
3 files changed, 39 insertions, 1 deletions
diff --git a/tests/type-consistency/spec/index.ts b/tests/type-consistency/spec/index.ts index 9ef825f..4532493 100644 --- a/tests/type-consistency/spec/index.ts +++ b/tests/type-consistency/spec/index.ts @@ -1,4 +1,5 @@ import array from "./array"; import functions from "./function"; +import types from "./types"; -export default [array, functions]; +export default [array, functions, types]; diff --git a/tests/type-consistency/spec/types.ts b/tests/type-consistency/spec/types.ts new file mode 100644 index 0000000..8bac271 --- /dev/null +++ b/tests/type-consistency/spec/types.ts @@ -0,0 +1,22 @@ +import path from "path"; +import { createTestHarness } from "../harness"; + +export default createTestHarness({ + harnessName: "Types", + generatedPath: path.join(__dirname, "..", "generated"), +}) + .createProgramTest({ + name: "Handles number inputs", + program: "1,2,3", + expected: [1, 2, 3], + }) + .createProgramTest({ + name: "Handles string inputs", + program: `"hello", "world"`, + expected: ["hello", "world"], + }) + .createProgramTest({ + name: "Handles boolean inputs", + program: `true, false`, + expected: [true, false], + }); diff --git a/tests/type-consistency/tsconfig.json b/tests/type-consistency/tsconfig.json new file mode 100644 index 0000000..e1421ab --- /dev/null +++ b/tests/type-consistency/tsconfig.json @@ -0,0 +1,15 @@ +{ + "include": ["generated/**/*.ts"], + "compilerOptions": { + "target": "ES2022", + "module": "nodenext", + "moduleResolution": "nodenext", + "lib": ["ES2022", "dom"], + "outDir": "dist", + "strict": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true + } +} |
