foambubble / foam

A personal knowledge management and sharing system for VSCode
https://foambubble.github.io/
Other
15.47k stars 663 forks source link

no reference definition to wikilink to pic in test environment #1366

Open hereistheusername opened 4 months ago

hereistheusername commented 4 months ago

Describe the bug

when creating unit test in jest, I found that code in test environment cannot resolve the URI of a wikilink to picture, whereas it can do that in actual running environment. In an actual example, executing update-wikiling results in different result in running and testing environments, and the former is correctly. Fix this problem would be helpful in further development test.

Small Reproducible Example

https://github.com/hereistheusername/foam/tree/test/no-reference-definition-to-pic-in-test

Steps to Reproduce the Bug or Issue

  1. git clone -b test/no-reference-definition-to-pic-in-test https://github.com/hereistheusername/foam.git
  2. run and debug vscode-jest-tests in .vscode/launch.json

Expected behavior

I expect the test code should generate reference definition as running command foam-vscode.update-wikilink-definitions in actual vscode.

Screenshots or Videos

No response

Operating System Version

macOS

Visual Studio Code Version

Version: 1.90.2

Additional context

No response