diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2022-10-27 17:54:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 17:54:46 -0400 |
commit | a4d4acd1aff3f6213d43d921624d69195c379744 (patch) | |
tree | 9c3dd94821e36c59d97aea666d5dd4c3aa6823ef /cli/tests/testdata/npm/cjs_module_export_assignment | |
parent | 1376c6932f6357a38fa3d3d0f134951f3890964a (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')
-rw-r--r-- | cli/tests/testdata/npm/cjs_module_export_assignment/main.out | 3 | ||||
-rw-r--r-- | cli/tests/testdata/npm/cjs_module_export_assignment/main.ts | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/cjs_module_export_assignment/main.out b/cli/tests/testdata/npm/cjs_module_export_assignment/main.out new file mode 100644 index 000000000..7dfab41f1 --- /dev/null +++ b/cli/tests/testdata/npm/cjs_module_export_assignment/main.out @@ -0,0 +1,3 @@ +{ func: [Function: func] } +Module { default: { func: [Function: func] }, func: [Function: func] } +5 diff --git a/cli/tests/testdata/npm/cjs_module_export_assignment/main.ts b/cli/tests/testdata/npm/cjs_module_export_assignment/main.ts new file mode 100644 index 000000000..93d3db1c3 --- /dev/null +++ b/cli/tests/testdata/npm/cjs_module_export_assignment/main.ts @@ -0,0 +1,6 @@ +import defaultImport, * as namespaceImport from "npm:@denotest/cjs-module-export-assignment"; +import { func } from "npm:@denotest/cjs-module-export-assignment"; + +console.log(defaultImport); +console.log(namespaceImport); +console.log(func()); |