-
Notifications
You must be signed in to change notification settings - Fork 62
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
[WIP]Smoke test js #61
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ env/ | |
**/*.pyc | ||
**/__pycache__ | ||
|
||
# Ignore coverage files | ||
Frontend/coverage | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ templates | |
README.md | ||
*.yml | ||
*.yaml | ||
CONTRIBUTION.md | ||
CONTRIBUTION.md | ||
Frontend/coverage | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ jobs: | |
- yarn install --frozen-lockfile | ||
script: | ||
- yarn format | ||
- yarn test -- --coverage | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why the -- --coverage? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's to print the coverage result, that tabular output |
||
|
||
#This test helps us to check integrity of the backend code | ||
- language: python | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { configure } from "enzyme"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have this in the frontend tests folder itself instead of one level above? |
||
import Adapter from "enzyme-adapter-react-16"; | ||
configure({ adapter: new Adapter() }); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom"; | ||
import App from "../App"; | ||
|
||
import { shallow, mount } from "enzyme"; | ||
|
||
it("renders without crashing", () => { | ||
const div = document.createElement("div"); | ||
ReactDOM.render(<App />, div); | ||
ReactDOM.unmountComponentAtNode(div); | ||
}); |
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.
Instead of ignoring the directory that is being formed, we can ignore the following files
Also is it possible to shift tests in the root directory? Ideally, the path of test files should be -
./tests/frontend/
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.
Also, do add a single end line at the end of the file
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.
React isn't detecting any test files outside the
src/
folder. It's their rule to reside test files insrc/
folder. Looking if I find any tweak for this.