-
Notifications
You must be signed in to change notification settings - Fork 11
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
Rewrite the test runner to work with Jest 27 #68
Conversation
This makes #30 obsolete/ resolves it, right? |
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 left some general comments, I don't think there is anyone who can do a proper review of the actual changes to the test runner you did as you are probably the only person that understands this piece currently.
@@ -1,7 +1,7 @@ | |||
// import spyConsole from './console' |
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 file seems empty now (everything commented out), can it be deleted?
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.
It could, but we'll likely need it to process task IDs (which will come later) so I just left it.
test/fixtures/pythagorean-triplet/exemplar/pythagorean-triplet.spec.js
Outdated
Show resolved
Hide resolved
@SleeplessByte I ran some tests and noticed the following. With the main branch, an example for a failed test output looks like this: {
"name": "Clock > Creating a new clock with an initial time > hour and minutes roll over continuously",
"status": "fail",
"message": "Error: expect(received).toEqual(expected) // deep equality\n\nExpected: \"11:01\"\nReceived: \"10:12\"",
"output": null,
"test_code": "expect(new Clock(201, 3001).toString()).toEqual('11:01');"
}, With this new branch the output includes coloring (at least that is what I think it is): {
"name": "Clock > Creating a new clock with an initial time > hour and minutes roll over continuously",
"status": "fail",
"message": "Error: \u001b[2mexpect(\u001b[22m\u001b[31mreceived\u001b[39m\u001b[2m).\u001b[22mtoEqual\u001b[2m(\u001b[22m\u001b[32mexpected\u001b[39m\u001b[2m) // deep equality\u001b[22m\n\nExpected: \u001b[32m\"1\u001b[7m1:01\u001b[27m\"\u001b[39m\nReceived: \u001b[31m\"1\u001b[7m0:12\u001b[27m\"\u001b[39m",
"output": null,
"test_code": "expect(new Clock(201, 3001).toString()).toEqual('11:01');"
}, I am doubtful the website can handle the colors. If this is intended, are you sure about this? If this is not intended, I would have expected such a change should make some unit test fail. |
It can. And it's intended!!! |
No description provided.