summaryrefslogtreecommitdiffstats
path: root/test/fetch/general.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/fetch/general.js')
-rw-r--r--test/fetch/general.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/fetch/general.js b/test/fetch/general.js
new file mode 100644
index 0000000..0469875
--- /dev/null
+++ b/test/fetch/general.js
@@ -0,0 +1,30 @@
+'use strict'
+
+const { test } = require('tap')
+const {
+ File,
+ FormData,
+ Headers,
+ Request,
+ Response
+} = require('../../index')
+
+test('Symbol.toStringTag descriptor', (t) => {
+ for (const cls of [
+ File,
+ FormData,
+ Headers,
+ Request,
+ Response
+ ]) {
+ const desc = Object.getOwnPropertyDescriptor(cls.prototype, Symbol.toStringTag)
+ t.same(desc, {
+ value: cls.name,
+ writable: false,
+ enumerable: false,
+ configurable: true
+ })
+ }
+
+ t.end()
+})