Open mieseung opened 3 years ago
Thanks for your questions. The followings are the answers to each question:
--watchAll=false
option.index.js
will not be included. Also, serviceWorker.js
will not be included.
You can ignore them by adding the following in your package.json
.
"jest": {
collectCoverageFrom : [
"src/**/*.{js,jsx}" ,
"!src/index.js" ,
"!src/serviceWorker.js",
"!store/action/index.js"
] }
Statements
and the avg of Branch
.Let me know if you have any further questions.
I understood your answer about question 1, 2, and 4. But I have more questions about 3.
index.js
is src/index.js
. But the index.js
which I mentioned is store/action/index.js
. Should store/action/index.js
also be ignored?Thanks!
@mieseung Please also ignore the store/action/index.js
file. Sorry for the confusion.
Thanks a lot! :)
Hello, I have some questions about homework3 feature specification and testing.
Is there any spec and testcase for wrong url or not given url in specifications, like ‘localhost:3000’, ‘localhost:3000/werfd’ and so on?
In my case,
npm --test --coverage
does not work well. If i add the--watchAll=false
, it works well. Will the test codes be graded withnpm -- test --coverage --watchAll=false
or justnpm -- test --coverage
?I found that store/action/index.js file stay 0% coverage even though there are no uncovered lines. Is it okay? I think #72 has the same problem!
In Grading spec, does the unit test coverage mean the coverage for %Lines of all files? or is there any way to calculate this grading coverage?
Thanks in advance :)