-
-
Notifications
You must be signed in to change notification settings - Fork 15
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: migrate from tap to node:test and c8 #117
Conversation
test/index.test.js
Outdated
fastify.register(fastifyElasticsearch, { node: 'http://localhost:9200' }) | ||
|
||
await fastify.ready() | ||
t.equal(fastify.elastic.name, 'elasticsearch-js') | ||
assert.equal(fastify.elastic.name, 'elasticsearch-js') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use t.assert.equal etc. and not directly assert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessing t.assert
doesn't work as it ends up giving TypeError [Error]: Cannot read properties of undefined (reading 'equal')
.
Any idea on how to solve it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with 85ac08f, but I'm not able to run tests locally anymore because of the error reported previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should use t.assert.equal etc. and not directly assert
Hey @Uzlopak, thanks for the review 😁 Could you explain the rationale behind using t.assert
instead of assert
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that Node 18 was removed from plugins-ci-elasticsearch.yml
few months back.
Maybe we should move from the v4.2.0
to a more recent one? v5.0.0
seems to contain the Node 18 removal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference between t.assert
and assert
is that t.assert
works with t.plan
for assertion counting.
I think in this case does not make any difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Please see: #117 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove .taprc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci is red
With the very same error I got locally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to rebase
Co-Authored-By: Pietro Marchini <[email protected]>
Co-Authored-By: Pietro Marchini <[email protected]>
85ac08f
to
d502a5b
Compare
FYI Node has native support for code coverage thresholds nodejs/node#54429 from Node 22 (which will become LTS the 29th of October) |
FYI Node has native support for code coverage threshold nodejs/node#54429 from Node 22 (which will become LTS the 29th of October) |
Then, it is not an option for us until it backported to |
It will not be backported unless its already in 20.18.0 |
I am only saying we cannot use this feature because it is not in the By that time, |
Migrate from
tap
tonode:test
andc8
.Co-Authored-By: Pietro Marchini [email protected]
Checklist
npm run test
andno benchmarksnpm run benchmark
tests and/or benchmarks are includedno benchmarksand the Code of conduct