-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
Describe the bug
I came across this error and the fix seemed to be to move the export const statement from the spec, then put it in its own file.
I created a new StackBlitz from the Angular template, ensured that it was the latest version of Angular, installed vitest and jsdom, and added the minimum config to get it up and running.
https://stackblitz.com/edit/stackblitz-starters-sj74ev3n?file=src%2Fabc.spec.ts
Reproduction
Run the test from command line, using npm run test. See that the main.spec.ts file reportedly has no tests, which is false. Then, remove the following line from abc.spec.ts:
import { foo as mainFoo } from './main.spec';Then, of course, remove the usage of that const from the test. Now the tests all pass.
System Info
StackblitzUsed Package Manager
npm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Reactions are currently unavailable