Fixed lint warning and propose fail or warning
This commit is contained in:
parent
3f768f9a14
commit
bc31040ea9
2 changed files with 10 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"eslint": "eslint --ext .js,.js.es6 .",
|
||||
"eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
|
||||
"eslint-fix": "npm run eslint -- --fix",
|
||||
"eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html"
|
||||
},
|
||||
|
|
|
@ -21,16 +21,18 @@
|
|||
return this.project = new Project();
|
||||
});
|
||||
return describe('project list', function() {
|
||||
beforeEach((function(_this) {
|
||||
return function() {
|
||||
_this.projects_data = fixture.load('projects.json')[0];
|
||||
return spyOn(jQuery, 'ajax').and.callFake(function(req) {
|
||||
var fakeAjaxResponse = function fakeAjaxResponse(req) {
|
||||
var d;
|
||||
expect(req.url).toBe('/api/v3/projects.json?simple=true');
|
||||
d = $.Deferred();
|
||||
d.resolve(_this.projects_data);
|
||||
d.resolve(this.projects_data);
|
||||
return d.promise();
|
||||
});
|
||||
};
|
||||
|
||||
beforeEach((function(_this) {
|
||||
return function() {
|
||||
_this.projects_data = fixture.load('projects.json')[0];
|
||||
return spyOn(jQuery, 'ajax').and.callFake(fakeAjaxResponse.bind(_this));
|
||||
};
|
||||
})(this));
|
||||
it('to show on toggle click', (function(_this) {
|
||||
|
|
Loading…
Reference in a new issue