Giter VIP home page Giter VIP logo

Comments (23)

nikku avatar nikku commented on June 1, 2024

Could you create an example repository that reproduces the issue?

from karma-browserify.

 avatar commented on June 1, 2024

There you go: https://github.com/telegraphinho/karma-browserify-test

There's a bug with browserify installation now(it was introduced a couple of hours ago). The workaround is in the first lines of readme file.

EDIT: removed workaround for browserify dependencies bug. The package updated and it's not needed anymore.

EDIT2: gave it some additional testing. Removed all transforms, mocha-reporter and other stuff from the mix. Only karma-browserify, karma-phantomjs-launcher and jasmine left. No coffeescript anymore. Only js. Also tried changing browser to karma-chrome-launcher. Still no luck. Same error.

Also found this thread: thlorenz/proxyquireify#21 with the very same problem.

There is a solution to the problem in that thread. It seems like that plugin overrode the require at some point. I looked through the source code for karma-browserify and other related plugins but didn't notice such thing.

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

I'm having the same problem as @telegraphinho, I haven't been able to find a solution... but noticed it's guaranteed to happen with autoWatch enabled and the module being tested (not the test) is edited.

from karma-browserify.

 avatar commented on June 1, 2024

@webfella, for me it happens with the test file itself too. Most often when i add the a new test(it block). Sometimes when i remove or comment some test or just change something else. But it's not as often as with adding a new one.

from karma-browserify.

bendrucker avatar bendrucker commented on June 1, 2024

Most often when i add the a new test(it block). Sometimes when i remove or comment some test or just change something else. But it's not as often as with adding a new one.

Pretty certain this is not the case. There's no way the effect could be so dependent on your code.

@webfella Are you on OS X as well?

from karma-browserify.

 avatar commented on June 1, 2024

@bendrucker, yeah. Probably just a coincidence. Anyways, that's what i noticed.

Btw,

but noticed it's guaranteed to happen with autoWatch enabled

The problem doesn't happen when autoWatch=false or singleRun=true. That's for sure. Tested multiple times.

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

@bendrucker Yeah mate, OS X here too. Just at a quick glance, it seems as if the time when it fails it's not bundling correctly as I logged out the buffer and it was only around 450b.

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

I can verify this is not an issue on Arch Linux.

It may be a caching issue related to the coffee-script transform though (don't know if it actually caches things).

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

@nikku I'm getting the issue without any transforms in the project. I can put up a version on github with the use case I'm running into in a few hours if that helps.

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

That would be good.

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

I just put it up, I can strip out any noise around gulp and using it's source streams for multiple packages if that helps... I just ripped it out of my current project.

from karma-browserify.

bendrucker avatar bendrucker commented on June 1, 2024

I'll take the lead on digging in on this since it's OS X-specific. I also just got in touch with Travis about getting included on the multi-OS beta. Might be hard to impossible to get a reliable failing test against this but I'd like to try anyway.

from karma-browserify.

bendrucker avatar bendrucker commented on June 1, 2024

@telegraphinho what you referenced in #75 (comment) is unrelated. I just closed thlorenz/proxyquireify#21 last night. That was actually a proxyquireify bug.

Will work on @webfella's repro now.

from karma-browserify.

bendrucker avatar bendrucker commented on June 1, 2024

Hmm. So what's actually going on here is that no files are getting included in the bundle when it's rebuilt after a change to a source file. Investigating...

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

@bendrucker Yeah I couldn't track it down apart from removing the part that deletes missing files, which obviously isn't ideal.

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

Thanks a lot guys, I just verified the patch works for my use case. Looking forward to seein it on npm.

Cheers

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

Just released the fixes with [email protected].

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

Thanks for the heads up @nikku

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

I have a question regarding autoWatch, that I thought I'd ask here instead of starting a new issue.

Is there a way through the library to only run the tests affected by the change, ie a change to the "foo" module only triggers the "foo" tests instead of the entire suite? I havn't found a way to do it yet with browserify.

from karma-browserify.

nikku avatar nikku commented on June 1, 2024

This is something that would be a feature of karma-browserify rather than browserify. It is not implemented though and not the way karma works, too.

You can yield a similar behavior yourself though: If you are using mocha, specify it.only(...) to run a focused test. Use iit(...) in jasmine.

from karma-browserify.

webfella avatar webfella commented on June 1, 2024

Thanks for clearing that up mate, much appreciated.

from karma-browserify.

dallasclark avatar dallasclark commented on June 1, 2024

I'm having this issue now with the latest release. Oddly, I'm the only developer in a team of 6 experiencing this issue.

When I run the following command: $ grunt unit (Task: clean:reports install_custom_coverage karma:unit), I receive the following result:

...
DEBUG [web-server]: serving: C:\Dev\life-web_components\node_modules\karma\static/context.html
PhantomJS 1.9.8 (Windows 7) ERROR
  TEST RUN WAS CANCELLED because this file contains some errors:
    C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify


IE 8.0.0 (Windows 7) ERROR
  TEST RUN WAS CANCELLED because this file contains some errors:
    C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify

Chrome 41.0.2272 (Windows 7) ERROR
  TEST RUN WAS CANCELLED because this file contains some errors:
    C:/cygwin/tmp/2cfb2e9479b44a59f6d3c57d366bd5b4.browserify



DEBUG [karma]: Run complete, exiting.
DEBUG [launcher]: Disconnecting all browsers
DEBUG [framework.browserify]: cleaning up
DEBUG [launcher]: Process PhantomJS exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-34162292
DEBUG [launcher]: Process Chrome exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-61774528
DEBUG [reporter.junit]: JUnit results written to "C:/Dev/life-web_components/reports/unit_tests.xml".

DEBUG [launcher]: Killed extra IE process 6528
DEBUG [launcher]: Process IE exited with code 0
DEBUG [temp-dir]: Cleaning temp dir C:\cygwin\tmp\karma-94332604
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.

I've tried a range of suggestions, restarting CMDER, restarting machine, deleting node_modules, reinstalling global node modules, set autoWatch to false and various other attempts with no luck.

As I'm the only developer in the team experiencing the issue, it appears to be environment related.

from karma-browserify.

dallasclark avatar dallasclark commented on June 1, 2024

Please ignore previous post, it turned out to be a component in our repo that required npm install within the directory to install it's dependencies.

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.