Skip to content

Commit

Permalink
Fix tests in Node.js v16 (#4597)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcollina committed Feb 26, 2023
1 parent 562332a commit 09cac4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/package-manager-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
matrix:
# Maintenance and active LTS
node-version: [14, 16]
node-version: [14, 16, 18]
os: [ubuntu-latest]

steps:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
# Maintenance and active LTS
node-version: [14, 16]
node-version: [14, 16, 18]
os: [ubuntu-latest]

steps:
Expand Down
18 changes: 10 additions & 8 deletions test/logger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@ before(async function () {
[localhost, localhostForURL] = await helper.getLoopbackHost()
})

teardown(() => {
files.forEach((file) => {
try {
fs.unlinkSync(file)
} catch (e) {
console.log(e)
}
if (process.env.CI) {
teardown(() => {
files.forEach((file) => {
try {
fs.unlinkSync(file)
} catch (e) {
console.log(e)
}
})
})
})
}

test('defaults to info level', t => {
let fastify = null
Expand Down

0 comments on commit 09cac4a

Please sign in to comment.