Closed maheshbansod closed 6 months ago
We probably won't do this, instead you should rewrite your tests to be cwd independent:
Deno.readTextFileSync(new URL('deno.json', import.meta.url))
The two choices for cwd are the workspace root (folder?) or the most local deno.json
. The latter would disable running all of your workspace tests parallelly in one process. The location of the workspace root is a property of your project just as much as the deno.json
's location, so it's a viable design.
Describe the bug
To Reproduce
[Set up repo with deno enabled in a folder]
root
deno
within itdeno
folder with contents:{}
.vscode/settings.json
in theroot
folder with settingsdeno.enable
as true,deno.enablePaths
as['./deno']
, anddeno.config
as./deno/deno.json
(the settings needed to make the deno extension work with the deno folder)[Add a test]
deno
folder that readsdeno.json
(from the same directory) i.e. useDeno.readTextFileSync('./deno.json')
[Observe bug]
Expected behavior
The test code should successfully be able to read
deno.json
Screenshots
If applicable, add screenshots to help explain your problem.
Versions
vscode: 1.86.2 deno: 1.42.1 extension: 3.37.1 (should be reproducible with any versions)