Giter Site home page Giter Site logo

Comments (9)

JamieMason avatar JamieMason commented on May 13, 2024

Thanks for this @michael42.

Integration with Node is currently the most awkward aspect of this project. I agree that some kind of method is needed such as require('jasmine-expect').register() (or similar) to get around this problem.

from jasmine-matchers.

JamieMason avatar JamieMason commented on May 13, 2024

/cc to users who've opened issues on this project before, a question for you. How do you tend to include Jasmine Matchers on a Node.js project? I'm trying to think of what might be the best way to do it — and I'm pretty sure it will require an API change.

Thanks.

@Hemins @JessicaSachs @MathRobin @PaulTondeur @RALifeCoach @alecxe @anisylen @atruskie @cryptoquick @endorama @jasonjohnson115 @jelinson @jhuesos @jrencz @message @michael42 @mohit-excelindia @mrozbarry @mull @pavelmigolinets @rkawala @tandrewnichols @xuxiankun

from jasmine-matchers.

mull avatar mull commented on May 13, 2024

We're only including it once in our of our jest specs by simply importing it. Sorry I can't be of more help :/

from jasmine-matchers.

 avatar commented on May 13, 2024

Same as @mull. Include it once within our Jasmine specs and let it rip.

from jasmine-matchers.

JamieMason avatar JamieMason commented on May 13, 2024

Thanks @mull @anisylen. I had thought that just including require('jasmine-expect') at the very start of your spec was all that was needed to include this in node, but I could see how it could be possible that the behaviour @michael42 describes could happen.

Could it be that this has been fixed since it was opened? @michael42 can you confirm?

Thanks.

from jasmine-matchers.

PaulTondeur avatar PaulTondeur commented on May 13, 2024

I can confirm the include as @mull and @anisylen are describing.

from jasmine-matchers.

mrozbarry avatar mrozbarry commented on May 13, 2024

We are including it in a helper file, and our setup looks like this:

spec/support/jasmine.json:

{
  "spec_dir": "spec",
  "spec_files": [
    "**/*.spec.js"
  ],
  "helpers": [
    "helpers/*.js"
  ]
}

spec/helpers/extra.js:

// ...
require('jasmine-expect');
// ...

from jasmine-matchers.

JamieMason avatar JamieMason commented on May 13, 2024

Thanks all, ok I think this is working then and can be closed.

from jasmine-matchers.

michaeljota avatar michaeljota commented on May 13, 2024

Hi! You should post this on the readme.md. This is like a how-to-use with gulp-jasmine.

Thanks! 👍

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.