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

Alpha 3: it.todo causes debug code lens to crash #657

Closed
markcarroll opened this issue Feb 2, 2021 · 3 comments · Fixed by #662
Closed

Alpha 3: it.todo causes debug code lens to crash #657

markcarroll opened this issue Feb 2, 2021 · 3 comments · Fixed by #662

Comments

@markcarroll
Copy link

Environment

  1. node -v: 12.20.0

  2. npm -v: 6.14.8

  3. npm ls jest or npm ls react-scripts (if you haven’t ejected): 26.6.3

  4. Operating system: macOS 11.1

Prerequisite

  • are you able to run jest test from command line? yes
  • how do you run your tests from command line? (for example: npm run test or node_modules/.bin/jest) npm run test

Steps to Reproduce

describe("test cases", () => {
  it.todo("should accept multiple object IDs");

  it("should fail 403 forbidden with missing parameters", async () => {
    const result = await invokeHandler(handler, {}, {});
    expect(result).not.toBeNull();
    expect(result.statusCode).toEqual(403);
  });
});

Relevant Debug Info

/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4574 TypeError: Cannot read property 'length' of undefined
	at Object.t.testIdString (/Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:19)
	at i (/Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:338)
	at t.JestExt.<anonymous> (/Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:338)
	at Generator.next (<anonymous>)
	at /Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:338
	at new Promise (<anonymous>)
	at n (/Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:338)
	at t.JestExt.runTest (/Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:338)
	at /Users/mark/.vscode/extensions/orta.vscode-jest-4.0.0-alpha.3/out/extension.js:123
	at _executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701)
	at _doExecuteCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:700)
	at _.executeCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:700)
	at b._executeConvertedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:703)
	at _executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701)
	at _.$executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:701)
	at m._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:892)
	at m._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:892)
	at m._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:891)
	at m._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:890)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:888
	at l.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46)
	at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:233)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:1094
	at l.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46)
	at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:233)
	at t.PersistentProtocol._receiveMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:238)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:235
	at l.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46)
	at p.acceptChunk (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:231)
	at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:230
	at Socket.t (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:240)
	at Socket.emit (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/events.js:223)
	at Socket.EventEmitter.emit (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/domain.js:475)
	at addChunk (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/_stream_readable.js:309)
	at readableAddChunk (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/_stream_readable.js:290)
	at Socket.Readable.push (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/_stream_readable.js:224)
	at Pipe.onStreamRead (/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/internal/stream_base_commons.js:181)

Expected Behavior

clicking on the debug code lens should start debugging

Actual Behavior

nothing happens - error in console.

If I have an it.todo in the file, the debug lens does not work.


@markcarroll markcarroll changed the title Alpha 3: Alpha 3: it.todo causes debug code lens to crash Feb 2, 2021
@connectdotz
Copy link
Collaborator

indeed this is a bug that is triggered by the it.todo... working on a fix now

@pmcelhaney
Copy link
Contributor

I'm working on removing the debug tag for todo tests (#634). Not sure if that will fix this issue.

@connectdotz
Copy link
Collaborator

probably not, the problem with todo is that jest did not generate location info for them, which broke the matching logic...

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

Successfully merging a pull request may close this issue.

3 participants