Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tap version to avoid intermittent test failures. #115

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: ./.github/workflows/playwright.yml

test:
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v4.0.0
needs: e2e
with:
license-check: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/package-manager-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ on:

jobs:
test:
uses: fastify/workflows/.github/workflows/plugins-ci-package-manager.yml@v3
uses: fastify/workflows/.github/workflows/plugins-ci-package-manager.yml@v4.0.0
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