linting tests

This commit is contained in:
Jeffrey Sun 2017-06-13 16:00:21 -07:00
parent 5c4e1e1d31
commit a55f0f4549
2 changed files with 34 additions and 31 deletions

View file

@ -27,6 +27,7 @@
"node-gyp": "^3.4.0", "node-gyp": "^3.4.0",
"sanitize-filename": "^1.6.1", "sanitize-filename": "^1.6.1",
"sharp": "^0.18.1", "sharp": "^0.18.1",
"standard": "^8.6.0",
"supertest": "^3.0.0", "supertest": "^3.0.0",
"uuid": "^3.0.1" "uuid": "^3.0.1"
}, },

View file

@ -1,3 +1,5 @@
const describe = require('mocha').describe
const it = require('mocha').it
const request = require('supertest') const request = require('supertest')
const assert = require('assert') const assert = require('assert')
const sharp = require('sharp') const sharp = require('sharp')
@ -14,7 +16,7 @@ describe('Foxy-moxy', () => {
.get(`/${width}/${testUID}`) .get(`/${width}/${testUID}`)
.expect('Content-Type', 'image/png') .expect('Content-Type', 'image/png')
.expect(200) .expect(200)
.end(function(err, res) { .end(function (err, res) {
assert(!err, String(err)) assert(!err, String(err))
sharp(res.body).metadata((err, metadata) => { sharp(res.body).metadata((err, metadata) => {
assert(!err, String(err)) assert(!err, String(err))
@ -32,7 +34,7 @@ describe('Foxy-moxy', () => {
.get(`/${width}/${testUID}`) .get(`/${width}/${testUID}`)
.expect('Content-Type', 'image/png') .expect('Content-Type', 'image/png')
.expect(200) .expect(200)
.end(function(err, res) { .end(function (err, res) {
assert(!err, String(err)) assert(!err, String(err))
sharp(res.body).metadata((err, metadata) => { sharp(res.body).metadata((err, metadata) => {
assert(!err, String(err)) assert(!err, String(err))