Skip to content

Commit

Permalink
test: unmention Travis CI
Browse files Browse the repository at this point in the history
It is dead.
  • Loading branch information
nikku authored Sep 15, 2021
1 parent 494ae17 commit 75a474a
Showing 1 changed file with 27 additions and 32 deletions.
59 changes: 27 additions & 32 deletions test/spec/pluginSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -434,50 +434,45 @@ describe('karma-browserify', function() {
});


// TODO(nikku): Yup, aint gonna work on travis CI :-(
if (!process.env.TRAVIS) {
it('should handle file remove', function(done) {

it('should handle file remove', function(done) {

// given
var plugin = createPlugin({ autoWatch: true });

var bundleFile = createFile(bundle.location);
var testFile = createFile('test/fixtures/b.js');
// given
var plugin = createPlugin({ autoWatch: true });

// initial bundle creation
plugin.preprocess(bundleFile, [ testFile ], function() {
var bundleFile = createFile(bundle.location);
var testFile = createFile('test/fixtures/b.js');

// reset spy on bundle
bundle.update.resetHistory();
// initial bundle creation
plugin.preprocess(bundleFile, [ testFile ], function() {

// when
// remove file
delay(function() {
bFile.remove();
});
// reset spy on bundle
bundle.update.resetHistory();

// update a bundled file
delay(function() {
aFile.update('module.exports = "UPDATED";');
}, 500);
// when
// remove file
delay(function() {
bFile.remove();
});

// give watch a chance to trigger
delay(function() {
// update a bundled file
delay(function() {
aFile.update('module.exports = "UPDATED";');
}, 500);

// then
// update with file deleted
expect(bundle.update).to.have.been.called;
// give watch a chance to trigger
delay(function() {

expect(bundleFile.realContents()).not.to.contain('/b.js');
done();
}, BUNDLE_UPDATE_CHECK_DELAY);
// then
// update with file deleted
expect(bundle.update).to.have.been.called;

});
expect(bundleFile.realContents()).not.to.contain('/b.js');
done();
}, BUNDLE_UPDATE_CHECK_DELAY);

});

}
});

});

Expand Down

0 comments on commit 75a474a

Please sign in to comment.