blob: ac9cbf2be908bafa29ba8d8287ba4de9ae1719b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
'use strict'
const { test } = require('tap')
const { fetch } = require('../..')
test('fetching about: uris', async (t) => {
t.test('about:blank', async (t) => {
await t.rejects(fetch('about:blank'))
})
t.test('All other about: urls should return an error', async (t) => {
try {
await fetch('about:config')
t.fail('fetching about:config should fail')
} catch (e) {
t.ok(e, 'this error was expected')
} finally {
t.end()
}
})
})
|