summaryrefslogtreecommitdiff
path: root/tests/type-consistency/spec
diff options
context:
space:
mode:
Diffstat (limited to 'tests/type-consistency/spec')
-rw-r--r--tests/type-consistency/spec/index.ts3
-rw-r--r--tests/type-consistency/spec/types.ts22
2 files changed, 24 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],
+ });