src: Missed changes
This commit is contained in:
parent
aa095cc048
commit
3cda4d0bdb
2 changed files with 5 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- '10'
|
- '10'
|
||||||
|
- '8'
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ import fs from 'fs';
|
||||||
import net from 'net';
|
import net from 'net';
|
||||||
import Stream from 'stream';
|
import Stream from 'stream';
|
||||||
import util from 'util';
|
import util from 'util';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
|
const URLGlobal = typeof URL === 'undefined' ? require('url').URL : URL;
|
||||||
import tempy from 'tempy';
|
import tempy from 'tempy';
|
||||||
import test, {ExecutionContext} from 'ava';
|
import test, {ExecutionContext} from 'ava';
|
||||||
import {JSDOM} from 'jsdom';
|
import {JSDOM} from 'jsdom';
|
||||||
|
|
@ -656,7 +658,7 @@ test('is.directInstanceOf', t => {
|
||||||
});
|
});
|
||||||
|
|
||||||
test('is.urlInstance', t => {
|
test('is.urlInstance', t => {
|
||||||
const url = new URL('https://example.com');
|
const url = new URLGlobal('https://example.com');
|
||||||
t.true(is.urlInstance(url));
|
t.true(is.urlInstance(url));
|
||||||
t.false(is.urlInstance({}));
|
t.false(is.urlInstance({}));
|
||||||
t.false(is.urlInstance(undefined));
|
t.false(is.urlInstance(undefined));
|
||||||
|
|
@ -666,7 +668,7 @@ test('is.urlInstance', t => {
|
||||||
test('is.urlString', t => {
|
test('is.urlString', t => {
|
||||||
const url = 'https://example.com';
|
const url = 'https://example.com';
|
||||||
t.true(is.urlString(url));
|
t.true(is.urlString(url));
|
||||||
t.false(is.urlString(new URL(url)));
|
t.false(is.urlString(new URLGlobal(url)));
|
||||||
t.false(is.urlString({}));
|
t.false(is.urlString({}));
|
||||||
t.false(is.urlString(undefined));
|
t.false(is.urlString(undefined));
|
||||||
t.false(is.urlString(null));
|
t.false(is.urlString(null));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue