Closed darge98 closed 2 years ago
Hey @darge98, your repo doesn't seem to contain any test. Afaik useFakeTimers
should be used on a per-test file basis though, not per-test case.
Hi @jeysal, sorry for the repo. I update it.
The test are inside src/app/toolbar
.
However, I try to add useFakeTimers
in the file, but now every test will fail with the same error.
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days.
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Hi, I'm new to Unit Test. I tried to create Unit test in an Angular application. I have one suite with 5 tests. 3 of them used the
useFakeTimers
function. When I run every test individually I have a successfull message. When I run the suite only the first that useuseFakeTimers
pass, the other return the following message:To Reproduce
Run test individually and run all the suite.
Expected behavior
Same result when running individually test and the suite.
Link to repl or repo (highly encouraged)
Here
Run
npx envinfo --preset jest