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

Add initial tests for App and generator #11

Merged
merged 1 commit into from
Oct 3, 2020

Conversation

dekpient
Copy link
Contributor

@dekpient dekpient commented Oct 3, 2020

This PR adds some unit tests and user interaction tests for issue #10

I've also enabled coverage report and add a test job as part of the build workflow. Hope this helps! 😃

@dekpient
Copy link
Contributor Author

dekpient commented Oct 3, 2020

 PASS  src/generator/__test__/index.test.js
  ✓ generating minimum policy (4ms)

 PASS  src/App.test.js (5.901s)
  ✓ display the generated policy for the given project data (2034ms)
  ✓ display error for invalid account ID (905ms)

--------------------|----------|----------|----------|----------|-------------------|
File                |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
--------------------|----------|----------|----------|----------|-------------------|
All files           |    39.82 |    38.46 |    18.18 |    39.82 |                   |
 src                |    14.29 |    11.11 |     5.56 |    14.29 |                   |
  App.js            |     87.5 |      100 |       50 |     87.5 |                81 |
  index.js          |        0 |      100 |      100 |        0 |             10,20 |
  serviceWorker.js  |        0 |        0 |        0 |        0 |... 32,133,135,138 |
 src/components     |    64.29 |    38.89 |    44.44 |    64.29 |                   |
  Form.js           |      100 |       50 |      100 |      100 |... 48,279,310,341 |
  ResourcesArray.js |     37.5 |    16.67 |    16.67 |     37.5 |    27,31,41,52,61 |
 src/generator      |       44 |       50 |     12.5 |       44 |                   |
  index.js          |       44 |       50 |     12.5 |       44 |... ,92,97,100,105 |
 src/validation     |       72 |    61.76 |      100 |       72 |                   |
  index.js          |       72 |    61.76 |      100 |       72 |... 28,32,36,40,44 |
--------------------|----------|----------|----------|----------|-------------------|
Test Suites: 2 passed, 2 total
Tests:       3 passed, 3 total
Snapshots:   0 total
Time:        8.164s, estimated 9s
Ran all test suites.

Copy link
Member

@nadunindunil nadunindunil left a comment

Choose a reason for hiding this comment

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

Thank you

@nadunindunil nadunindunil merged commit 5b13f91 into Open-SL:master Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants