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

Better indication of pending tests when Wallaby.js is slow? #1677

Open
JoshuaKGoldberg opened this issue May 29, 2018 · 5 comments
Open

Better indication of pending tests when Wallaby.js is slow? #1677

JoshuaKGoldberg opened this issue May 29, 2018 · 5 comments

Comments

@JoshuaKGoldberg
Copy link

Issue description or question

Suppose you're running Jest tests on an overheating laptop and some unit tests take >=1 seconds to run. After editing a line, the red error text next to lines that throw an error is the same shade of red while tests are re-running. That can be confusing, especially if the tests take several seconds.

Can they be a duller shade of red or otherwise indicate they're out of date while tests are pending?

Wallaby.js configuration file

module.exports = () => ({
	env: {
		type: "node",
	},

	files: [
		"tsconfig.test.json",
		"test/unit/jest.config.js",
		"test/unit/setup.js",
		"src/**/*.ts",
		"!src/**/*.test.ts",
		"src/**/*.tsx",
		"!src/**/*.test.tsx",
	],

	setup: (wallaby) => {
		wallaby.testFramework.configure(require("./test/unit/jest.config"));
	},

	testFramework: "jest",

	tests: [
		"src/**/*.test.ts",
		"src/**/*.test.tsx",
	],
});

Code editor or IDE name and version

Visual Studio Code v1.23.0

OS name and version

Windows 10

@ArtemGovorov
Copy link
Member

Can they be a duller shade of red or otherwise indicate they're out of date while tests are pending?

We can definitely experiment with it. My concern would be to check (given the already overheated laptop) that re-rendering the error messages in a different color doesn't make the performance even worse (up to the point when the editor process doesn't get enough CPU time and editing starts lagging).

@ArtemGovorov
Copy link
Member

We do hide the error message on the line that is being edited. What do you reckon if we hide all error messages in the file being edited if a test run takes more than 1 second?

@JoshuaKGoldberg
Copy link
Author

Ah but sometimes I want to see those old messages...

@IPWright83
Copy link

I'm suffering a similar thing at the moment actually, and have some other suggestions (happy to spin into a new issue if required). When you've got a lot of tests it's difficult to know from the App when things are ready. It'd be really great if:

  1. You could report a completed 10/25 tests status so we can see progress, and also see how impactful our changes to code are.
  2. Sometimes I just want to run a single test because I'm just trying to fix that one, but I don't want to fit or fdescribe stuff or restart wallaby. It'd be nice if there was a Stop current test execution command, so then I can Run line tests.

@lstone
Copy link

lstone commented Jun 4, 2020

Reporting the amount of tests completed while running tests would be immensely helpful as stated above. "completed 12/200 tests".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants