Skip to content

Commit

Permalink
Update tap version to avoid intermittent test failures.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidTanner committed Dec 26, 2023
1 parent 3cf8d5d commit 9ae5e5d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ pids
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Tap
.tap

# Coverage directory used by tools like istanbul
coverage
*.lcov
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,15 @@
"@fastify/pre-commit": "^2.0.2",
"@fastify/swagger": "^8.0.0",
"@playwright/test": "^1.39.0",
"@tapjs/snapshot": "^1.2.17",
"@types/node": "^20.1.1",
"ajv": "^8.11.0",
"fastify": "^4.0.0",
"fs-extra": "^11.0.0",
"qs": "^6.11.0",
"standard": "^17.0.0",
"swagger-ui-dist": "5.10.5",
"tap": "^16.3.2",
"tap": "^18.6.1",
"tsd": "^0.30.0"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tap-snapshots/test/static.test.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports['test/static.test.js TAP postProcessor works, swagger route returns updated yaml > must match snapshot 1'] = `
exports['test/static.test.js > TAP > postProcessor works, swagger route returns updated yaml > must match snapshot 1'] = `
openapi: 3.0.0
info:
description: Test swagger specification
Expand Down Expand Up @@ -40,7 +40,7 @@ paths:
`

exports['test/static.test.js TAP swagger route returns explicitly passed doc > must match snapshot 1'] = `
exports['test/static.test.js > TAP > swagger route returns explicitly passed doc > must match snapshot 1'] = `
{
"message": "Route GET:/documentation/json not found",
"error": "Not Found",
Expand Down
5 changes: 4 additions & 1 deletion test/transform-swagger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ test('transformSpecificationClone false should not deepclone fastify.swagger() /
url: '/documentation/json'
})

t.strictSame(fastify.swagger(), JSON.parse(res.body))
const swagger = fastify.swagger()
Object.getOwnPropertySymbols(swagger.definitions.User).forEach((symbol) => delete swagger.definitions.User[symbol])

t.strictSame(swagger, JSON.parse(res.body))
})

test('transformSpecification should modify the yaml', async (t) => {
Expand Down

0 comments on commit 9ae5e5d

Please sign in to comment.