summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/cjs_module_export_assignment_number
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-10-27 17:54:46 -0400
committerGitHub <noreply@github.com>2022-10-27 17:54:46 -0400
commita4d4acd1aff3f6213d43d921624d69195c379744 (patch)
tree9c3dd94821e36c59d97aea666d5dd4c3aa6823ef /cli/tests/testdata/npm/cjs_module_export_assignment_number
parent1376c6932f6357a38fa3d3d0f134951f3890964a (diff)
chore(npm): add explicit tests for `module.exports` assignment with type checking (#16435)
Diffstat (limited to 'cli/tests/testdata/npm/cjs_module_export_assignment_number')
-rw-r--r--cli/tests/testdata/npm/cjs_module_export_assignment_number/main.out3
-rw-r--r--cli/tests/testdata/npm/cjs_module_export_assignment_number/main.ts7
2 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/cjs_module_export_assignment_number/main.out b/cli/tests/testdata/npm/cjs_module_export_assignment_number/main.out
new file mode 100644
index 000000000..c808f4143
--- /dev/null
+++ b/cli/tests/testdata/npm/cjs_module_export_assignment_number/main.out
@@ -0,0 +1,3 @@
+5
+5
+Module { default: 5 }
diff --git a/cli/tests/testdata/npm/cjs_module_export_assignment_number/main.ts b/cli/tests/testdata/npm/cjs_module_export_assignment_number/main.ts
new file mode 100644
index 000000000..aee24bf19
--- /dev/null
+++ b/cli/tests/testdata/npm/cjs_module_export_assignment_number/main.ts
@@ -0,0 +1,7 @@
+import defaultImport, * as namespaceImport from "npm:@denotest/cjs-module-export-assignment-number";
+
+const testDefault: 5 = defaultImport;
+console.log(testDefault);
+const testNamespace: 5 = namespaceImport.default;
+console.log(testNamespace);
+console.log(namespaceImport);