I found the problem. I had a separate Project.toml file in the test directory so the test dependencies would be separate from those of the main project. This apparently confused the VSCode test extensions. Once I removed the Project.toml file it worked fine.