mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 13:16:36 +00:00
Run linter as part of npm test
(#436)
* Fix lint warnings Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com> * Run linter as part of `npm test` Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
abb7dc6469
commit
7d0ea21567
@ -37,6 +37,6 @@ module.exports = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return path.basename(input);
|
return path.basename(input);
|
||||||
}
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
"url": "git@github.com:resin-io/etcher.git"
|
"url": "git@github.com:resin-io/etcher.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "electron-mocha --recursive --renderer tests/gui -R min",
|
"test": "gulp lint && electron-mocha --recursive --renderer tests/gui -R min",
|
||||||
"start": "electron lib/start.js"
|
"start": "electron lib/start.js"
|
||||||
},
|
},
|
||||||
"author": "Juan Cruz Viotti <juan@resin.io>",
|
"author": "Juan Cruz Viotti <juan@resin.io>",
|
||||||
|
@ -40,6 +40,7 @@ describe('Browser: OSDropzone', function() {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should pass the file back to the callback as $file', function(done) {
|
it('should pass the file back to the callback as $file', function(done) {
|
||||||
|
const statStub = m.sinon.stub(fs, 'statSync');
|
||||||
$rootScope.onDropZone = function(file) {
|
$rootScope.onDropZone = function(file) {
|
||||||
statStub.restore();
|
statStub.restore();
|
||||||
m.chai.expect(file).to.deep.equal({
|
m.chai.expect(file).to.deep.equal({
|
||||||
@ -49,7 +50,6 @@ describe('Browser: OSDropzone', function() {
|
|||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
|
|
||||||
const statStub = m.sinon.stub(fs, 'statSync');
|
|
||||||
statStub.returns({
|
statStub.returns({
|
||||||
size: 999999999
|
size: 999999999
|
||||||
});
|
});
|
||||||
@ -73,13 +73,13 @@ describe('Browser: OSDropzone', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should pass undefined to the callback if not passing $file', function(done) {
|
it('should pass undefined to the callback if not passing $file', function(done) {
|
||||||
|
const statStub = m.sinon.stub(fs, 'statSync');
|
||||||
$rootScope.onDropZone = function(file) {
|
$rootScope.onDropZone = function(file) {
|
||||||
statStub.restore();
|
statStub.restore();
|
||||||
m.chai.expect(file).to.be.undefined;
|
m.chai.expect(file).to.be.undefined;
|
||||||
done();
|
done();
|
||||||
};
|
};
|
||||||
|
|
||||||
const statStub = m.sinon.stub(fs, 'statSync');
|
|
||||||
statStub.returns({
|
statStub.returns({
|
||||||
size: 999999999
|
size: 999999999
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user