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