Giter Site home page Giter Site logo

Comments (4)

amavisca avatar amavisca commented on August 17, 2024

I don't mind the idea of invalidating the cache. I think the alternative is to manually run code in a vm context. It's nice being able to offload the effort of execution to require.

If you'd like you could submit your cache invalidation + specs for it as a PR - otherwise I can add a fix to this.

from jasmine-npm.

amavisca avatar amavisca commented on August 17, 2024

A problem with invalidating the cache is that this will only really the problem with your spec files. If your source files change and are being require'd into your spec, you won't see a change in your source file within the same process because that file is still cached.

What wasn't working for you with spawning a new process?

from jasmine-npm.

soswow avatar soswow commented on August 17, 2024

I was using it with web driver. And i keep webdriver client reference to
speedup execution time.

On Tue, 3 Mar 2015 07:27 Christopher Amavisca [email protected]
wrote:

A problem with invalidating the cache is that this will only really the
problem with your spec files. If your source files change and are being
require'd into your spec, you won't see a change in your source file
within the same process because that file is still cached.

What wasn't working for you with spawning a new process?


Reply to this email directly or view it on GitHub
#30 (comment).

from jasmine-npm.

slackersoft avatar slackersoft commented on August 17, 2024

I think if we get to a point where jasmine-npm has some ability to watch the project and run specs when files change, we will still need to spawn a child process to actually run the specs, given all of the issues around require caching.

Other workarounds would involve loading all of the code up into a vm that had a fresh cache each time, but that would probably still break your use case.

I've made some notes in #5 about making sure that new code is loaded and probably forking a child process to get a fresh cache. I'm going to close this in favor of that issue, since it seems like this has mostly morphed into that issue.

Thanks for using jasmine!

from jasmine-npm.

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.