Skip to content
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

Closed
wants to merge 4 commits into from
Closed

[WIP]Smoke test js #61

wants to merge 4 commits into from

Conversation

jsparmani
Copy link
Member

Fix #56

@jsparmani jsparmani self-assigned this May 9, 2020
Copy link
Member

@shubhank-saxena shubhank-saxena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsparmani this PR needs some changes.

  1. We never upload the coverage reports to the Github as they change every time a user runs the tests. So you need to add the entire coverage folder to .gitignore.
  2. We need to make a folder named tests under frontend, which should contain all the tests.

@jsparmani
Copy link
Member Author

@jsparmani this PR needs some changes.

  1. We never upload the coverage reports to the Github as they change every time a user runs the tests. So you need to add the entire coverage folder to .gitignore.
  2. We need to make a folder named tests under frontend, which should contain all the tests.

Okay, will work on these changes

CONTRIBUTION.md
Frontend/coverage
Copy link
Member

@shubhank-saxena shubhank-saxena May 9, 2020

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

  1. coverage
  2. coverage.xml
  3. .coverage

Also is it possible to shift tests in the root directory? Ideally, the path of test files should be -
./tests/frontend/

Copy link
Member

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

Copy link
Member Author

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

  1. coverage
  2. coverage.xml
  3. .coverage

Also is it possible to shift tests in the root directory? Ideally, the path of test files should be -
./tests/frontend/

React isn't detecting any test files outside the src/ folder. It's their rule to reside test files in src/ folder. Looking if I find any tweak for this.

@@ -18,6 +18,7 @@ jobs:
- yarn install --frozen-lockfile
script:
- yarn format
- yarn test -- --coverage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the -- --coverage?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's to print the coverage result, that tabular output

@@ -0,0 +1,3 @@
import { configure } from "enzyme";
Copy link
Member

Choose a reason for hiding this comment

The 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?

@jsparmani jsparmani changed the title Smoke test js [WIP]Smoke test js May 10, 2020
@shubhank-saxena
Copy link
Member

@all-contributors please add @jsparmani for code,design,maintenance

@allcontributors
Copy link
Contributor

@shubhank-saxena

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@shubhank-saxena
Copy link
Member

@all-contributors please add @jsparmani for code, design, and maintenance

@allcontributors
Copy link
Contributor

@shubhank-saxena

I've put up a pull request to add @jsparmani! 🎉

@shubhank-saxena
Copy link
Member

@all-contributors please add @aniketbiswas21 for code, design, and maintenance

@allcontributors
Copy link
Contributor

@shubhank-saxena

I've put up a pull request to add @aniketbiswas21! 🎉

@shubhank-saxena
Copy link
Member

@all-contributors please add @shubhank-saxena for design and maintenance

@allcontributors
Copy link
Contributor

@shubhank-saxena

I've put up a pull request to add @shubhank-saxena! 🎉

@shubhank-saxena
Copy link
Member

@all-contributors please add @animesh-007 for docs

@allcontributors
Copy link
Contributor

@shubhank-saxena

I've put up a pull request to add @animesh-007! 🎉

@jsparmani jsparmani marked this pull request as draft May 12, 2020 18:11
@shubhank-saxena
Copy link
Member

Status @jsparmani

@jsparmani
Copy link
Member Author

jsparmani commented May 15, 2020

Status @jsparmani

React isn't detecting any test files outside the src/ folder. It's their rule to reside test files in src/ folder. Looking if I find any tweak for this.

@shubhank-saxena
Copy link
Member

@jsparmani would suggest you to install jest instead of the default testing, I think this issue would be solved. You will have to just add the script for test

@jsparmani jsparmani closed this Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add smoke test for React
2 participants