-
Notifications
You must be signed in to change notification settings - Fork 9
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
First drop of react unit tests #111
Conversation
@fbricon the CI build failure is because there are conflicting type definitions between the installed versions of @types/mocha and @types/jest. Since I am using Jest for testing, can I remove @types/mocha from devDependencies? |
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.
You should not have a conflict between mocha and jest since the main package doesn't and shouldn't be concerned about react and jest
package.json
Outdated
], | ||
"moduleNameMapper": { | ||
"\\.(css|less|scss|sass)$": "identity-obj-proxy" | ||
} |
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.
those changes seem unnecessary, since the tests only affect the webviews/ package
package.json
Outdated
"test:jest": "jest", | ||
"test:ci": "jest --ci --reporters=default --reporters=jest-junit" |
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 should delegate the jest tests from the webviews package
webviews/src/StatusCheck.tsx
Outdated
@@ -1,5 +1,5 @@ | |||
import { VscArrowCircleDown, VscCircleLarge, VscCircleLargeFilled, VscPass, VscPassFilled } from "react-icons/vsc"; | |||
|
|||
import React from 'react'; |
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.
seems unnecessary
@@ -6,6 +6,7 @@ import { ProgressData } from "../../src/commons/progressData"; | |||
import { getStandardName } from "../../src/commons/naming"; | |||
import { ModelStatus, ServerStatus } from "../../src/commons/statuses"; | |||
import { StatusCheck, StatusValue } from "./StatusCheck"; | |||
import React from 'react'; |
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.
seems unnecessary
Signed-off-by: Neehar Kurukunda <[email protected]>
package.json
Outdated
"test": "vscode-test" | ||
"test": "vscode-test", | ||
"test:jest": "cd webviews && npm run test", | ||
"test:ci": "cd webviews && jest --ci --reporters=default --reporters=jest-junit" |
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.
test:ci seems unused
webviews/src/ProgressBar.test.tsx
Outdated
@@ -2,7 +2,7 @@ import { render, screen } from '@testing-library/react'; | |||
import ProgressBar from './ProgressBar'; | |||
import { ProgressData } from '../../src/commons/progressData'; | |||
import '@testing-library/jest-dom'; | |||
import React from 'react'; | |||
//import React from 'react'; |
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.
don't comment, delete
the build fails and there are conflicts to fix |
Signed-off-by: Neehar Kurukunda <[email protected]>
Closing the PR as this is addressed in #123 |
In reference to: #49