Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo: rule-tester tests failing on v8 #9012

Closed
auvred opened this issue Apr 27, 2024 · 1 comment
Closed

Repo: rule-tester tests failing on v8 #9012

auvred opened this issue Apr 27, 2024 · 1 comment
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs tests anything to do with testing

Comments

@auvred
Copy link
Member

auvred commented Apr 27, 2024

Suggestion

❯ yarn test
 FAIL  tests/RuleTester.test.ts
  RuleTester
    ✓ schedules the parser caches to be cleared afterAll (1 ms)
    ✓ throws an error if you attempt to set the parser to ts-eslint at the test level (1 ms)
    filenames
      ✕ automatically sets the filename for tests (17 ms)
      ✕ allows the automated filenames to be overridden in the constructor (1 ms)
    checks dependencies as specified
      ✓ does not check dependencies if there are no dependency constraints (1 ms)
      ✕ correctly handles string-based at-least (2 ms)
      ✕ correctly handles object-based semver (2 ms)
      ✕ tests without versions should always be run (3 ms)
      does not check dependencies if is an "only" manually set
        ✓ in the valid section (1 ms)
        ✓ in the invalid section (1 ms)
      constructor constraints
        ✓ skips all tests if a constructor constraint is not satisifed (1 ms)
        ✓ does not skip all tests if a constructor constraint is satisifed (1 ms)
        ✓ does not call describe with valid if no valid tests are provided
        ✓ does not call describe with invalid if no invalid tests are provided (1 ms)

It fails because of new disallowAutomaticSingleRunInference parser's option (see #8922)

  ● RuleTester › checks dependencies as specified › tests without versions should always be run

    expect(received).toMatchInlineSnapshot(snapshot)

    Snapshot name: `RuleTester checks dependencies as specified tests without versions should always be run 1`

    - Snapshot  -  0
    + Received  + 21

    @@ -1,38 +1,53 @@
      [
        {
          "code": "string based is always run",
          "filename": "file.ts",
    +     "parserOptions": {
    +       "disallowAutomaticSingleRunInference": true,
    +     },
          "skip": false,
        },
        {
          "code": "no constraints is always run",
          "filename": "file.ts",
    +     "parserOptions": {
    +       "disallowAutomaticSingleRunInference": true,
    +     },
          "skip": false,
        },
        {
          "code": "empty object is always run",
          "dependencyConstraints": {},
          "filename": "file.ts",
    +     "parserOptions": {
    +       "disallowAutomaticSingleRunInference": true,
    +     },
          "skip": false,
        },
@auvred auvred added triage Waiting for maintainers to take a look repo maintenance things to do with maintenance of the repo, and not with code/docs tests anything to do with testing accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for maintainers to take a look labels Apr 27, 2024
@auvred
Copy link
Member Author

auvred commented Apr 30, 2024

Resolved in #9013

@auvred auvred closed this as completed Apr 30, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue repo maintenance things to do with maintenance of the repo, and not with code/docs tests anything to do with testing
Projects
None yet
Development

No branches or pull requests

1 participant