From 5fb6e00e2114fac1a774cdef3e23f60c5000a0a2 Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Sun, 30 Jan 2022 21:07:53 -0500 Subject: [PATCH] test: namespace export should have @@toStringTag value "Module" #4336 --- test/function/samples/namespace-to-string-tag/_config.js | 3 +++ test/function/samples/namespace-to-string-tag/foo.js | 1 + test/function/samples/namespace-to-string-tag/main.js | 3 +++ 3 files changed, 7 insertions(+) create mode 100644 test/function/samples/namespace-to-string-tag/_config.js create mode 100644 test/function/samples/namespace-to-string-tag/foo.js create mode 100644 test/function/samples/namespace-to-string-tag/main.js 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');