Skip to content

Commit

Permalink
chore: remove unused whatwg-url (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Mar 1, 2022
1 parent 65602ff commit 8aff18a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -29,8 +29,7 @@
"form-data": "^4.0.0",
"parted": "^0.1.1",
"string-to-arraybuffer": "^1.0.2",
"tap": "^15.1.6",
"whatwg-url": "^7.0.0"
"tap": "^15.1.6"
},
"dependencies": {
"minipass": "^3.1.6",
Expand Down
14 changes: 1 addition & 13 deletions test/index.js
Expand Up @@ -4,7 +4,6 @@ const TestServer = require('./fixtures/server.js')
const fetch = require('../lib/index.js')
const stringToArrayBuffer = require('string-to-arraybuffer')
const URLSearchParamsPolyfill = require('@ungap/url-search-params')
const { URL } = require('whatwg-url')
const { FetchError, Headers, Request, Response } = fetch
const FetchErrorOrig = require('../lib/fetch-error.js')
const HeadersOrig = require('../lib/headers.js')
Expand All @@ -24,7 +23,7 @@ const fs = require('fs')
const http = require('http')
// use of url.parse here is intentional and for coverage purposes
// eslint-disable-next-line node/no-deprecated-api
const { parse: parseURL, URLSearchParams, URL: CoreURL } = require('url')
const { parse: parseURL, URLSearchParams } = require('url')

const vm = require('vm')
const {
Expand Down Expand Up @@ -1519,17 +1518,6 @@ t.test('fetch with Node.js legacy URL object', t => {
})

t.test('fetch with Node.js URL object', t => {
const url = `${base}hello`
const urlObj = new CoreURL(url)
const req = new Request(urlObj)
return fetch(req).then(res => {
t.equal(res.url, url)
t.equal(res.ok, true)
t.equal(res.status, 200)
})
})

t.test('fetch with WHATWG URL object', t => {
const url = `${base}hello`
const urlObj = new URL(url)
const req = new Request(urlObj)
Expand Down

0 comments on commit 8aff18a

Please sign in to comment.