Giter Site home page Giter Site logo

Comments (6)

Necroskillz avatar Necroskillz commented on May 27, 2024 3

jasmine 3.5 now has it's own toBeTrue and toBeFalse matchers, so they could just be removed from this library.

from jasmine-matchers.

devoto13 avatar devoto13 commented on May 27, 2024 2

@JamieMason Would you be willing to accept a PR to remove expectationFailOutput?: any parameter from .toBeTrue() and .toBeFalse() matchers to prevent conflict with built-in matchers with the same name available as of Jasmine 3.5.0? This will require a major release as it is a breaking change.

Not suggesting complete removal of the matchers as Jest does not have them and also because it will affect more people then removal of the optional parameter.

For Jasmine expectationFailOutput works because of an implementation detail and is not a supported usage. That's why Jasmine 3.3.0 introduced .withContext() as supported way to add more information to the assertion.

Not sure how does this influence Jest users of the library though.

PS I will also try to deprecated expectationFailOutput parameters in @types/jasmine package in the coming weeks. If that goes through it should be a good idea to deprecate this parameter in all jasmine-expect matchers, so people would migrate from the unsupported usage.

from jasmine-matchers.

komyg avatar komyg commented on May 27, 2024 1

Hi,

I ran into the same problem with Jasmine in an Angular project. I managed to solve it by removing the jasmine-expect entry that I had in my tsconfig.spec.json file:

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/spec",
    "types": [
      "jasmine",
      "node",
      "jasmine-expect" # Removed this Line.
    ]
  },
  "files": [
    "test.ts",
    "polyfills.ts"
  ],
  "include": [
    "**/*.spec.ts",
    "**/*.d.ts"
  ]
}

from jasmine-matchers.

ShaneYu avatar ShaneYu commented on May 27, 2024 1

Is there any progress on this @JamieMason? The read me details that this library supports all versions of jest and Jasmine; but currently doesn't work with the last few releases of Jasmine.

A huge library of test matchers for a range of common use-cases, compatible with all versions of Jasmine and Jest.

from jasmine-matchers.

RobARichardson avatar RobARichardson commented on May 27, 2024

Had to revert back to Jasmine Core 3.4.0 to get around this issue for now.

from jasmine-matchers.

hoeni avatar hoeni commented on May 27, 2024

Did anyone here find a better workaround than pinning down Jasmine and its types to 3.4 until this gets fixed for good?

from jasmine-matchers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.