summaryrefslogtreecommitdiffstats
path: root/test/fetch/issue-2242.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/fetch/issue-2242.js')
-rw-r--r--test/fetch/issue-2242.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/fetch/issue-2242.js b/test/fetch/issue-2242.js
new file mode 100644
index 0000000..fe70412
--- /dev/null
+++ b/test/fetch/issue-2242.js
@@ -0,0 +1,8 @@
+'use strict'
+
+const { test } = require('tap')
+const { fetch } = require('../..')
+
+test('fetch with signal already aborted', async (t) => {
+ await t.rejects(fetch('http://localhost', { signal: AbortSignal.abort('Already aborted') }), 'Already aborted')
+})