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

Chore: Replace tape with tap in tests #432

Open
1 task
nelsonic opened this issue Sep 26, 2023 · 2 comments
Open
1 task

Chore: Replace tape with tap in tests #432

nelsonic opened this issue Sep 26, 2023 · 2 comments

Comments

@nelsonic
Copy link
Member

nelsonic commented Sep 26, 2023

All the @dependabot PRs attempting to update tape https://www.npmjs.com/package/tape (the testing library) fail
because tape made a few (totally unnecessary) breaking changes ...
tap https://www.npmjs.com/package/tap a less popular but similar functionality alternative has not made those changes.

Todo

  • update tests to replace tape with tap

See: dwyl/aws-sdk-mock#322 which updates tap without any issues. ✅

@nelsonic
Copy link
Member Author

Tests pass but eslint doesn't ...

TypeError: prettier.resolveConfig.sync is not a function
Occurred while linting /hapi-auth-jwt2/lib/extract.js:1
Rule: "prettier/prettier"
    at Program (/hapi-auth-jwt2/node_modules/eslint-plugin-prettier/eslint-plugin-prettier.js:138:40)
    at ruleErrorHandler (/hapi-auth-jwt2/node_modules/eslint/lib/linter/linter.js:1091:28)
    at /hapi-auth-jwt2/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/hapi-auth-jwt2/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/hapi-auth-jwt2/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/hapi-auth-jwt2/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/hapi-auth-jwt2/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (/hapi-auth-jwt2/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:803:23)
    at /hapi-auth-jwt2/node_modules/eslint/lib/linter/linter.js:1126:32

🤦‍♂️

nelsonic added a commit that referenced this issue Sep 26, 2023
…hen should be getting 401 ... 🤷‍♂️
@nelsonic
Copy link
Member Author

Tried updating a couple of test files from tape to tap on a @dependabot PR that was failing: #427

The response.statusCode changed from 401 to 404 on a couple of tests where the server didn't change at all.
This is very weird. Not got time to be spending on this right now.
If anyone else wants to help with migrating from tape to tap, please dive in! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: More ToDo ThanCanEver Be Done
Development

No branches or pull requests

1 participant