feat(mocha-to-node-test-runner) : Migrate Mocha v8 tests to Node.js test runner (v22, v24+)#313
feat(mocha-to-node-test-runner) : Migrate Mocha v8 tests to Node.js test runner (v22, v24+)#313Xstoudi wants to merge 16 commits intonodejs:mainfrom
Conversation
AugustinMauroy
left a comment
There was a problem hiding this comment.
Oh nice that really cool !
Few points that can be improved:
- md format on readme
- little bit of JSdoc
- small missing unit test
Co-authored-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
|
I wrote test for is-esm, let me know if you see something is missing. I applied your recommendations then reverted two of them:
Let me now if there is anything else. |
| it('should return -1 when the value is not present', function() { | ||
| const arr = [1, 2, 3]; | ||
| assert.strictEqual(arr.indexOf(4), -1); | ||
| }); |
There was a problem hiding this comment.
maybe add an other it that use arrow function as call back
and a fonction as arg like
function myBasicTest = () => {
assert(true)
}The second case will be can super complicated to migrate.
in a first time let's just have test that proof that's ins't handled and document it.
In second time (follow up pr) having systems that handle this case. The logic to catch a refercen is already furnished by the codemod context https://docs.codemod.com/jssg/semantic-analysis
|
Let me know if anything more is required. |
AugustinMauroy
left a comment
There was a problem hiding this comment.
LGMT ! for the code transformation part missing the removing dep you should take code from chalk-to-styletext.
|
Added that, let me know if something is missing. |
AugustinMauroy
left a comment
There was a problem hiding this comment.
For me it's good ! we need to wait a second approval to land !
|
F*ck what happened here. !Windows! cc @nodejs/userland-migrations any idea |
|
hey 👋 @Xstoudi |
Co-authored-by: Bruno Rodrigues <swe@brunocroh.com>
AugustinMauroy
left a comment
There was a problem hiding this comment.
LGTM ! I stil don't get why windows give this error
Maybe use lower comparison level on testing https://docs.codemod.com/jssg/testing#strictness-levels
Should fix #103