-
Notifications
You must be signed in to change notification settings - Fork 139
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
migrate sql-mapper, sql-openapi, sql-graphql to node:test #1827
migrate sql-mapper, sql-openapi, sql-graphql to node:test #1827
Conversation
4bb5d84
to
f5a933e
Compare
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.
any reason why this is still in draft?
packages/sql-mapper/test/helper.js
Outdated
return true | ||
} | ||
|
||
module.exports.match = match |
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.
This is better to be put inside utils module, I suspect this would be used often.
(CI is failintg) |
This PR is still in draft as I'm trying to fix the CI. I think the test contexts are not triggering the table cleanup actions correctly. I'll spend more time on this since these tests are one of the main parts of Platformatic. |
cb3b1d6
to
3a8e447
Compare
Any suggestions as to why snapshot tests (sql-openapi) fail? @mcollina |
3a8e447
to
fcbfa58
Compare
Will try to take a look! |
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
fcbfa58
to
bc311ae
Compare
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Hey @mcollina, sorry this PR has been in draft for a while but unfortunately I haven't had the time to devote to it yet... in the next few days I would like to pick it up again |
Signed-off-by: Matteo Collina <hello@matteocollina.com>
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
Signed-off-by: mateonunez <mateonunez95@gmail.com>
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.
lgtm
This PR follows the #1796 by migrating tests from
tap
tonode:test
.I introduced a simple helper method
match
, which has the same behavior as the tap match assertion. This method is useful when you want to assert that two objects match the same structure. Unfortunately, the node match assertion only works well for regular expressions.I also created a runner file to avoid concurrency problems (this runner and others will be dropped when the
--test-concurrency
flag will be available in this CI, Node v20.10 was released right now).Migrated test
sql-mapper