You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using karma-bro to provide browserify support for karma, and it looks like there's a race condition between the preprocessing and the running of tests. It only happens with grunt-karma, not when I run karma directly.
When I change one of my test files to flip a test between failing and not failing, then save, watch picks up the change, but the test outcome is as if I hadn't made the change. When I make and save a second change, the outcome is as if I'd only made the first change. e.g.:
it('does basic math',function(){expect(4+4).toEqual(8);});// file starts like thisit('does basic math',function(){expect(4+4).toEqual(10);});// save -- test passesit('does basic math',function(){expect(4+4).toEqual(9);});// save -- test fails with "expected 8 to equal 9"it('does basic math',function(){expect(4+4).toEqual(8);});// save -- test fails with "expected 8 to equal 10"
I'm guessing the preprocessing is happening in the karma:dev:start thread, so there's a race condition. Any suggestions for how to work around this?
I'm using karma-bro to provide browserify support for karma, and it looks like there's a race condition between the preprocessing and the running of tests. It only happens with grunt-karma, not when I run karma directly.
When I change one of my test files to flip a test between failing and not failing, then save,
watch
picks up the change, but the test outcome is as if I hadn't made the change. When I make and save a second change, the outcome is as if I'd only made the first change. e.g.:I'm guessing the preprocessing is happening in the
karma:dev:start
thread, so there's a race condition. Any suggestions for how to work around this?My Karma config:
My Grunt config (excerpted):
The text was updated successfully, but these errors were encountered: