Help from @brenoepics #1387
Replies: 3 comments 5 replies
-
|
Sounds good! I’ll check out the TODOs and make separate PRs for each or ask if anything needs further discussion before making changes. |
Beta Was this translation helpful? Give feedback.
-
|
For some reason, we don't have actually, isn't it likely unreachable code? I think the IDEs don't mark it because of Maybe it is an workaround to: node-pg-migrate/bin/node-pg-migrate.ts Lines 636 to 650 in e37aa21 we dont (if we actually await, everything works well but it takes a few ms or seconds more to run) I'm imagining something like this function demoEarlyExit() {
const promise = new Promise((resolve) => {
console.log("1. Promise created");
setTimeout(() => {
console.log("2. Promise resolved");
resolve();
}, 100);
});
promise.then(() => {
console.log("3. Then block");
process.exit(0);
});
console.log("4. Exiting early!");
process.exit(2); // This exits before the promise can resolve
}
demoEarlyExit();
//RESULT:
//1. Promise created
//4. Exiting early!I'm working on TODO: /bin vitest coverage, rn I have about 90% coverage but need to check this. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
#1222 (comment)
@brenoepics if you would like to, there are some tests that are marked with e.g.
// TODO @Shinigami92 2024-04-04: Should this throw an error?node-pg-migrate/test/utils/makeComment.spec.ts
Line 6 in 93e398c
There are definitely more like this in the test-code-base.
So if you want to work on these things, this would be a great help 🚀
Please make a dedicated PR per function-change. And we also need sometimes to investigate what to really do. Throw error? Remove functionality? Do something else?
After we solved many of the todos, I'm planning either for 8.x (>8.0) or 9.0 a pretty option #1122
Beta Was this translation helpful? Give feedback.
All reactions