texasranger
texasranger2y ago

Why does `deno test` add an older version of the `std` library to my deno.lock?

My testing files do not reference std/0.165 and my import-map.json is pinned to std/0.177. When I use deno run everything works fine. When I use deno test for some reason std/0.165 is added to my deno.lock file and then I get errors about core.runMicrotasks is not a function. How do I keep deno test from adding an older version of std to the deno.lock file?
7 Replies
texasranger
texasranger2y ago
Running rm -rf $HOME/Library/Caches/deno fixed it. Why did I have to do that though?
ioB
ioB2y ago
weird... @crowlkats any ideas?
crowlKats
crowlKats2y ago
i am unsure, thats really strange deno doesnt add std deps itself
texasranger
texasranger2y ago
my tests do not load/add any extra dependencies which would differ from deno run
KyleJune
KyleJune2y ago
Maybe one of your non std dependencies depend on std@0.165.0
texasranger
texasranger2y ago
I don't know -- again, once I cleared the cache the issue went away
KyleJune
KyleJune2y ago
Strange.