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:
Juan Cruz Viotti 2016-05-24 15:35:51 -04:00
parent abb7dc6469
commit 7d0ea21567
3 changed files with 4 additions and 4 deletions

View File

@ -37,6 +37,6 @@ module.exports = function() {
}
return path.basename(input);
}
};
};

View File

@ -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>",

View File

@ -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
});