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

Rename or delete a watched test file will cause MODULE_NOT_FOUND error #53113

Closed
jakecastelli opened this issue May 23, 2024 · 0 comments · Fixed by #53114
Closed

Rename or delete a watched test file will cause MODULE_NOT_FOUND error #53113

jakecastelli opened this issue May 23, 2024 · 0 comments · Fixed by #53114
Labels
test_runner Issues and PRs related to the test runner subsystem. watch-mode Issues and PRs related to watch mode

Comments

@jakecastelli
Copy link
Member

jakecastelli commented May 23, 2024

Version

v20.10.0

Platform

Darwin 22.2.0 ARM 64

What steps will reproduce the bug?

create a test folder, and then create a couple of test files. .e.g

test
├── 1.mjs
├── 2.mjs
└── 3.mjs

each file can optionally add a dummy test:

import { test } from 'node:test';
import assert from 'node:assert';

test('testTwo', () => {
  assert.equal(1, 1);
});

then run node --watch --test

Rename a file or delete a file under the ./test/ folder, and you will observe the Error: Cannot find module ${your-test-file-name}

What is the expected behavior? Why is that the expected behavior?

The test runner should be able to pick up file rename and file deletion

What do you see instead?

It throws an error

jakecastelli added a commit to jakecastelli/node that referenced this issue May 23, 2024
jakecastelli added a commit to jakecastelli/node that referenced this issue May 23, 2024
@VoltrexKeyva VoltrexKeyva added test_runner Issues and PRs related to the test runner subsystem. watch-mode Issues and PRs related to watch mode labels May 23, 2024
jakecastelli added a commit to jakecastelli/node that referenced this issue May 24, 2024
jakecastelli added a commit to jakecastelli/node that referenced this issue May 25, 2024
jakecastelli added a commit to jakecastelli/node that referenced this issue May 25, 2024
jakecastelli added a commit to jakecastelli/node that referenced this issue May 25, 2024
nodejs-github-bot pushed a commit that referenced this issue Jun 2, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
targos pushed a commit that referenced this issue Jun 3, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
eliphazbouye pushed a commit to eliphazbouye/node that referenced this issue Jun 20, 2024
Fixes: nodejs#53113
PR-URL: nodejs#53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
bmeck pushed a commit to bmeck/node that referenced this issue Jun 22, 2024
Fixes: nodejs#53113
PR-URL: nodejs#53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
marco-ippolito pushed a commit that referenced this issue Jul 19, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
marco-ippolito pushed a commit that referenced this issue Jul 19, 2024
Fixes: #53113
PR-URL: #53114
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Raz Luvaton <rluvaton@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test_runner Issues and PRs related to the test runner subsystem. watch-mode Issues and PRs related to watch mode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants