You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a test file that includes tests defined in a function outside of a fully denormalized, nested testing flow, the test runner in VS Code hangs. On the command line, the tests execute as expected.
To Reproduce
Here's the code (for a simplest case reproduction):
const sharedTestSuite = (key: string) => {
it('test', () => { // normally would be it(`test of ${key}` or whatever, but keeping it simple
expect(key).toEqual('yes');
});
};
describe('simple repro', () => {
sharedTestSuite('no');
});
Results on command line (some text cleanup performed):
Spitball: I wonder if this is related to describe.each and test.each are shown as 'test result not found' #7, as that's the entry point for this issue. I originally had tests running in a loop, and the above construction seems to reduce the actual error to its simplest case.
The VS Code plugin seems to be doing a naïve pass through the file, grabbing all the test-related markers (describe, it, etc), and building an expected test tree that includes those as conventional tests, even though they're in a different, reused scope.
Either way, this isn't working in the runner, but works fine on the command line.
The text was updated successfully, but these errors were encountered:
Describe the bug
When I have a test file that includes tests defined in a function outside of a fully denormalized, nested testing flow, the test runner in VS Code hangs. On the command line, the tests execute as expected.
To Reproduce
Here's the code (for a simplest case reproduction):
Results on command line (some text cleanup performed):
That's good. That's what we want.
In the runner
In the runner, things hang.
I'm using the "Run test" button pictured here. Note that this is a TypeScript environment, for what that's worth.
The tests are run. You can follow through by debugging and everything's happy. It hangs on completion.
Expected behavior
Environment
Tried this:
but stopped when I got
'yarn' is not recognized as an internal or external command,
.By hand, we've got...
Spitball: I wonder if this is related to describe.each and test.each are shown as 'test result not found' #7, as that's the entry point for this issue. I originally had tests running in a loop, and the above construction seems to reduce the actual error to its simplest case.
The VS Code plugin seems to be doing a naïve pass through the file, grabbing all the test-related markers (
describe
,it
, etc), and building an expected test tree that includes those as conventional tests, even though they're in a different, reused scope.Either way, this isn't working in the runner, but works fine on the command line.
The text was updated successfully, but these errors were encountered: