Comments (12)
@SimenB @Dreamsorcerer
I found a way to display the total number of pending tests. To achieve this, I had to search within the Jasmine and JestAdapter classes. Below is the screenshot showing the outcome, and here is the commit for the changes in 230b11b.
from jest.
Hi @Dreamsorcerer
What do you think about adding the percentage at the end of the test suite?
See the example below
from jest.
Anything that shows some progress while it's running would be an improvement. Displaying the results of each test as they complete though, can be more helpful, as you can figure out what test the runner is stuck on (particularly useful in weird edge cases where the runner itself ends up hanging and never completing).
from jest.
I see that it is better to add it at the end of the Test suite, as placing it next to each test can get confusing when several tests occur in parallel and so this percentage shows the percentage of all tests
from jest.
I think the request was for progress within a single test file, not the total (which we already have, albeit not as a percentage).
So I think it should be next to a RUNS
(and nothing for completed ones) rather than in the summary. Probably behind some sort of option? This feels more line a continuation of #6616 with more precise data rather than doing math on the data we already display
from jest.
I misunderstood the original question. The percentage is really not important, you can do whatever you want to do with it (pytest does show the global percentage after each test, but is also, most often, run in a synchronous manner). The main point is that I should be able to see some output after each test, and can figure out which test the runner is stuck on if it were to freeze/crash.
from jest.
What if we were to add the 'X passed' field next to the path description indicating how many test were completed?
Is this approach useful @Dreamsorcerer @SimenB?
from jest.
Yeah, that looks good to me! Maybe out of a total per test file as well? I think we have this information available
from jest.
If you mean that the number is updated as each test passes (as opposed to a total shown at the end of the file run), then that's probably good enough.
from jest.
@SimenB
Should we exclude the percentage at the conclusion of the test suite?
It would be beneficial to display a percentage out of the total for each test file too but I couldn't locate any property that provides this value before or during the execution of the file.
from jest.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
from jest.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
from jest.
Related Issues (20)
- [Docs]: Update Footer On Jest Website
- [Feature]: Ability to dispatch spec files to jest non-interactively
- Failed build: Node Nightly CI HOT 40
- [Feature]: Report duplicate test names HOT 4
- [Feature]: New hook `beforeEach.successive` which is like beforeEach, but only for successive tests in the suite HOT 4
- [Bug]: Unexpected token 'export' when Jest test imports d3-array (3.2.4) HOT 4
- [Bug]: ReferenceError: CSS is not defined HOT 1
- [Feature]: Option to support `Error#cause` in snapshots for Jest29 HOT 4
- [Bug]: Using `projects` option does not "copy the root-level configuration options to each individual child configuration during the test run" HOT 4
- [Feature]: The ability of `toHaveProperty` to parse dots in property name is so evil. Please remove it. HOT 1
- [Bug]: Error while running watch
- OpenJS Onboarding: Document Core Infrastructure By Filling Out Google Form HOT 1
- [Feature]: Support `import.meta.resolve` HOT 3
- [Feature]: Global / system wide config ?
- OpenJS Onboarding: Publish Security Policy HOT 1
- OpenJS Onboarding: Create & Publish Project Charter HOT 1
- [Bug]: `advanceTimersByTimeAsync` has inconsistent behavior regarding `setTimeout(x, 0)` HOT 4
- Why do my unit tests slow down after 26 upgrading to the latest version of jest HOT 2
- [Bug]: Reporter interface has onTestCaseStart, but that hook is never called
- [Docs]: Difference between runner and testRunner? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jest.