Giter VIP home page Giter VIP logo

Comments (7)

bendrucker avatar bendrucker commented on June 1, 2024

karma-browserifast uses a similar strategy (a tmp file) so it's helpful to hear that it's working. karma-bro uses watchify to do incremental bundles rather than trying to implement a separate watcher with chokidar. I don't think it's possible to change the filename without breaking Karma's handling of file matching. Mind whipping up a quick repo with your config so we can try to reproduce this?

from karma-browserify.

ianwremmel avatar ianwremmel commented on June 1, 2024

Unfortunately, it's all proprietary for the moment, so I can't share much of it. If I find some time in the next few days, I'll see if I can simulate a fake project.

Would simply adding a cache busting parameter (e.g. ?cachebust=<Date.now()>) also break the karma file matching?

Here's the karma config:

module.exports = (config) ->
  config.set
    frameworks: [
      'mocha'
      'browserify'
    ]

    basePath: '.'

    files: [
      'test/unit/spec/**/*.js'
      'test/integration/spec/**/*.js'
    ]

    exclude: [
      # skip the shim files, shim config in package.json will load them
      'test/unit/spec/**/*.shim.js'
      'test/integration/spec/**/*.shim.js'
    ]

    preprocessors:
      'test/unit/spec/**/*.js': ['browserify']
      'test/integration/spec/**/*.js': ['browserify']

    hostname: '127.0.0.1'

    port: 8000

    reporters: [
      'mocha'
    ]

    browserify:
      debug: true
      watch: true
      transform: [
        'browserify-shim'
      ]

    browserNoActivityTimeout: 5*60*1000
    browsers: [
      # 'ChromeWithoutSecurity'
      'Chrome'
      'Firefox'
      'Safari'
    ]

    browserNoActivityTimeout: 5*60*1000

    customLaunchers:
      ChromeWithoutSecurity:
        base: 'Chrome'
        flags: ['--disable-web-security']

from karma-browserify.

bendrucker avatar bendrucker commented on June 1, 2024

My understanding is that Karma is responsible for reloading and filenames can't be changed

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

Yes, karma is 100% in charge of caching files (and appending cache busting parameters, if needed).

Try using chrome and report if the problem persists. If so, it might be a problem with the karma-safari-launcher.

I experienced some caching problems with IE and PhantomJS, too but there is nothing karma-bro can do to mitigate this.

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

Feel free to reopen the issue if you have a reproducible test case.

from karma-browserify.

terinjokes avatar terinjokes commented on June 1, 2024

I get this all the time running karma interactively (ie: not using a launcher).

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

Which environment / karma / karma-bro version do you use?

from karma-browserify.

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.