Fix JSCS errors

This commit is contained in:
Rowan Manning
2016-04-25 21:26:59 +01:00
parent 90328cfa39
commit ea48d6a6fd
31 changed files with 366 additions and 364 deletions

View File

@@ -17,9 +17,9 @@
var assert = require('proclaim');
describe('GET /<task-id>/<result-id>.csv', function () {
describe('GET /<task-id>/<result-id>.csv', function() {
beforeEach(function (done) {
beforeEach(function(done) {
var req = {
method: 'GET',
endpoint: '/abc000000000000000000001/def000000000000000000001.csv',
@@ -28,19 +28,19 @@ describe('GET /<task-id>/<result-id>.csv', function () {
this.navigate(req, done);
});
it('should send a 200 status', function () {
it('should send a 200 status', function() {
assert.strictEqual(this.last.status, 200);
});
it('should output CSV results', function () {
it('should output CSV results', function() {
assert.match(this.last.body, /^"code","message","type"/);
});
});
describe('GET /<task-id>/<result-id>.json', function () {
describe('GET /<task-id>/<result-id>.json', function() {
beforeEach(function (done) {
beforeEach(function(done) {
var req = {
method: 'GET',
endpoint: '/abc000000000000000000001/def000000000000000000001.json',
@@ -49,11 +49,11 @@ describe('GET /<task-id>/<result-id>.json', function () {
this.navigate(req, done);
});
it('should send a 200 status', function () {
it('should send a 200 status', function() {
assert.strictEqual(this.last.status, 200);
});
it('should output JSON results', function () {
it('should output JSON results', function() {
var json = this.last.body;
assert.strictEqual(json.task.name, 'NPG Home');
assert.strictEqual(json.task.url, 'nature.com');