drop support for node < v10

Upgrade deps
This commit is contained in:
Lloyd Brookes
2020-02-09 18:34:56 +00:00
parent c089eb11b8
commit c697416c80
8 changed files with 1006 additions and 1033 deletions

View File

@ -1,7 +1,7 @@
const Tom = require('test-runner').Tom
const fetch = require('node-fetch')
const LocalWebServer = require('../')
const a = require('assert')
const a = require('assert').strict
const tom = module.exports = new Tom()
@ -14,5 +14,5 @@ tom.test('basic', async function () {
const response = await fetch(`http://localhost:${port}/one.txt`)
ws.server.close()
const body = await response.text()
a.strictEqual(body, 'one\n')
a.equal(body, 'one\n')
})

View File

@ -1,5 +1,5 @@
const Tom = require('test-runner').Tom
const a = require('assert')
const a = require('assert').strict
const WsCli = require('../lib/cli-app')
const fetch = require('node-fetch')
@ -11,7 +11,7 @@ tom.test('simple', async function () {
const server = cli.start([ '--port', `${port}` ])
const response = await fetch(`http://127.0.0.1:${port}/package.json`)
server.close()
a.strictEqual(response.status, 200)
a.equal(response.status, 200)
})
tom.test('bad option', async function () {
@ -19,7 +19,7 @@ tom.test('bad option', async function () {
const cli = new WsCli({ logError: function () {} })
const server = cli.start([ '--should-fail' ])
if (!exitCode) process.exitCode = 0
a.strictEqual(server, undefined)
a.equal(server, undefined)
})
tom.test('--help', async function () {
@ -32,7 +32,7 @@ tom.test('--version', async function () {
const cli = new WsCli({ log: function (msg) { logMsg = msg } })
cli.start([ '--version' ])
const pkg = require('../package.json')
a.strictEqual(logMsg.trim(), pkg.version)
a.equal(logMsg.trim(), pkg.version)
})
tom.test('default-stack', async function () {