If I try to use manual to inspect a test, the import path is based upon the absolute local filesystem path, regardless of what rootPath is set to. This can cause the imports to fail, only for manual mode, if rootPath is not a root directory, as the file is actually served based on its path from rootPath, not its full, absolute local filesystem path.
This appears to be handled correctly for standard testing; it's only an issue for manual mode.
(For Windows fanatics, feel free to replace the /s with \s at your leisure.)
With repoRoot resolving to C://a/b, the automatic testing mode (manual: false) will handle all paths perfectly. However, the manual path will fail to resolve /c/d/e/f/myTest.spec.mjs or similar paths when importing test spec files. Directly inputting http://localhost:8000/c/d/e/f/myTest.spec.mjs will resolve properly and show the resource in-browser, but the manual test page's import will be /a/b/c/d/e/f/myTest.spec.mjs, as viewable via element/source inspection of the host page.
I discovered this one alongside #2720.
If I try to use
manual
to inspect a test, the import path is based upon the absolute local filesystem path, regardless of whatrootPath
is set to. This can cause the imports to fail, only for manual mode, ifrootPath
is not a root directory, as the file is actually served based on its path fromrootPath
, not its full, absolute local filesystem path.This appears to be handled correctly for standard testing; it's only an issue for manual mode.
Discovered with v0.18.1.
Suppose the following setup:
repoRoot: "../../"
[orC://a/b/
])(For Windows fanatics, feel free to replace the
/
s with\
s at your leisure.)With
repoRoot
resolving toC://a/b
, the automatic testing mode (manual: false
) will handle all paths perfectly. However, themanual
path will fail to resolve/c/d/e/f/myTest.spec.mjs
or similar paths when importing test spec files. Directly inputtinghttp://localhost:8000/c/d/e/f/myTest.spec.mjs
will resolve properly and show the resource in-browser, but the manual test page's import will be/a/b/c/d/e/f/myTest.spec.mjs
, as viewable via element/source inspection of the host page.