connor4312 / nodejs-testing

VS Code integration for node:test native tests
MIT License
43 stars 6 forks source link

Editor tries to create a file when a test fails #7

Closed ervamate closed 1 year ago

ervamate commented 1 year ago

The runner works fine when all tests pass, but when it fails, I get the following screen:

test result

I'm on VSCode Version: 1.77.3 and I believe the version of the extension.

I thought it was related to me using devcontainers, however it happens while running on my machine.

When I press Create File, it returns the following error:

Unable to write file '/file:///Users/<full-path-to-file>' (Unknown (FileSystemError): Error: EROFS: read-only file system, mkdir '/file:')

I also noticed that the gutter does not show the arrow icon, but maybe that's unrelated

LMK if I can provide more info.

connor4312 commented 1 year ago

Thanks for the issue. I'm not able to repro this. My first suspect would be some kind of path sensitivity issue. Can you confirm that you're opening the file as Tokenizer.js and not something like tokenizer.js, and likewise that all parts of the file path in your workspace have the same casing as this incorrect file URI?

ervamate commented 1 year ago

I tried to reduce to the minimum setup. I created a new empty profile and installed only the extension. When I click "run tests" or run it with the keyboard shortcut and the test fails, here's what I get:

index test js — node-testing — nodejs-testing 2023-05-27 21-08-22

When I click "create file", here's what it shows:

Monosnap 2023-05-27 21-09-30

My current dir is:

$ pwd
/Users/felipe/Projects/cbh/node-testing

Hopefully this helps. This doesn't seem to happen on successful tests.

connor4312 commented 1 year ago

Sorry for the long turnaround time. Extension version 1.0.3 with this fixed is published.