Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Relevant Package
rule-tester
Expected Result
Run
$ cd packages/rule-tester; yarn run testwithout any errors.
Actual Result
$ cd packages/rule-tester; yarn run testPASS tests/flat-config-schema.test.tsFAIL tests/RuleTester.test.ts ● RuleTester › filenames › automatically sets the filename for tests expect(received).toMatchInlineSnapshot(snapshot) Snapshot name: `RuleTester filenames automatically sets the filename for tests 1` - Snapshot - 1 + Received + 6 @@ -17,11 +17,16 @@ }, }, }, { "code": "explicit filename shouldn't be overwritten", - "filename": "/set/in/the/test.ts", + "filename": "/some/path/that/totally/exists/set/in/the/test.ts", + "languageOptions": { + "parserOptions": { + "disallowAutomaticSingleRunInference": true, + }, + }, }, { "code": "jsx should have the correct filename", "filename": "/some/path/that/totally/exists/react.tsx", "languageOptions": { 192 | }); 193 | > 194 | expect(getTestConfigFromCall()).toMatchInlineSnapshot(` | ^ 195 | [ 196 | { 197 | "code": "string based valid test", at Object.toMatchInlineSnapshot (tests/RuleTester.test.ts:194:39) › 1 snapshot failed.Snapshot Summary › 1 snapshot failed from 1 test suite. Inspect your code changes or run `yarn run npx -u` to update them.Test Suites: 1 failed, 1 passed, 2 totalTests: 1 failed, 51 passed, 52 totalSnapshots: 1 failed, 8 passed, 9 totalTime: 1.622 s, estimated 2 sRan all test suites.The most interesting part is:
- "filename": "/set/in/the/test.ts", + "filename": "/some/path/that/totally/exists/set/in/the/test.ts",Additional Info
rule-tester package is not currently being tested in CI (see#9005). That's why this issue was unnoticed.
After bisecting, it turns out that this test case doesn't work after#9678.