-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix parsing many test suites on file #9
Conversation
@ETtestim Can you add some unit tests? |
|
@atlowChemi @barspielberg You want to add vitest or some other 3 party for testing? |
I think for this simple use case there is no reason not to use the built-in node test-runner. @barspielberg Thanks for that awesome 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.
as per to @barspielberg's comment regarding missing UT
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.
Could you add a test ensuring we only attempt calling Testim API when key provided for given Project ID?
Also a test validating the annotations, and not only the file name
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 will have another PR for this repo next sprint can we add those test then?
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.
What PR? which sprint?
I am confused
// @ts-expect-error | ||
t.assert.strictEqual(testReports.length, 3); | ||
// @ts-expect-error | ||
t.assert.strictEqual(testReports[0].annotations.length, 2); |
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.
we could also just use assert
directly and avoid // @ts-expect-error
// @ts-expect-error | ||
t.assert.strictEqual(testReports.length, 3); | ||
// @ts-expect-error | ||
t.assert.strictEqual(testReports[0].annotations.length, 2); |
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.
Could we snapshot test the entire testReports
object?
The code inside here was copied inside Testim code. |
Instead of assuming we get only one test suite in the file, now we parse all suites on file