Skip to content

Repo: rule-tester tests failing on v8 #9012

Closed
@auvred

Description

@auvred

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,
        },

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuelocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docstestsanything to do with testing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy