diff --git a/test/function/samples/namespace-to-string-tag/_config.js b/test/function/samples/namespace-to-string-tag/_config.js new file mode 100644 index 00000000000..8d9d2e50a7d --- /dev/null +++ b/test/function/samples/namespace-to-string-tag/_config.js @@ -0,0 +1,3 @@ +module.exports = { + description: 'namespace export should have @@toStringTag value "Module" #4336' +}; diff --git a/test/function/samples/namespace-to-string-tag/foo.js b/test/function/samples/namespace-to-string-tag/foo.js new file mode 100644 index 00000000000..c155820bf77 --- /dev/null +++ b/test/function/samples/namespace-to-string-tag/foo.js @@ -0,0 +1 @@ +export const foo = 'bar'; diff --git a/test/function/samples/namespace-to-string-tag/main.js b/test/function/samples/namespace-to-string-tag/main.js new file mode 100644 index 00000000000..5fb825fedfc --- /dev/null +++ b/test/function/samples/namespace-to-string-tag/main.js @@ -0,0 +1,3 @@ +import * as ns from './foo.js'; + +assert.strictEqual(ns[Symbol.toStringTag], 'Module');