mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +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);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
"url": "git@github.com:resin-io/etcher.git"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"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) {
|
||||
const statStub = m.sinon.stub(fs, 'statSync');
|
||||
$rootScope.onDropZone = function(file) {
|
||||
statStub.restore();
|
||||
m.chai.expect(file).to.deep.equal({
|
||||
@ -49,7 +50,6 @@ describe('Browser: OSDropzone', function() {
|
||||
done();
|
||||
};
|
||||
|
||||
const statStub = m.sinon.stub(fs, 'statSync');
|
||||
statStub.returns({
|
||||
size: 999999999
|
||||
});
|
||||
@ -73,13 +73,13 @@ describe('Browser: OSDropzone', function() {
|
||||
});
|
||||
|
||||
it('should pass undefined to the callback if not passing $file', function(done) {
|
||||
const statStub = m.sinon.stub(fs, 'statSync');
|
||||
$rootScope.onDropZone = function(file) {
|
||||
statStub.restore();
|
||||
m.chai.expect(file).to.be.undefined;
|
||||
done();
|
||||
};
|
||||
|
||||
const statStub = m.sinon.stub(fs, 'statSync');
|
||||
statStub.returns({
|
||||
size: 999999999
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user