Commit bc31040e authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Fixed lint warning and propose fail or warning

parent 3f768f9a
{ {
"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 @@ ...@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment