Visual Code unit tests missing reference

I’m using Visual Studio Code to develop my Julia package.
My runtests.jl file contains the following:

using mypackage
using Test

All unit tests in file test_module1.jl pass. So there is no problem with that.

However, Visual Studio Code flags all references to functions exported by mypackage with “Missing reference”. The result is a very colorful display with almost every line highlighted.

Moving the line using mypackage to file test_module1.jl doesn’t resolve the issue.

How can I get Visual Studio Code to resolve all those missing references in my unit test files?