From c3123efe550ca8b635064dcdf430264547fb7071 Mon Sep 17 00:00:00 2001 From: Zach Bjornson Date: Sat, 1 Aug 2015 10:19:12 -0700 Subject: [PATCH] Update test infrasturcture. --- package.json | 5 +++-- test/canvas.test.js | 6 +----- test/server.js | 7 ++----- test/views/layout.jade | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index b5e1cda..eb3ab8a 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,9 @@ "nan": "^1.8.4" }, "devDependencies": { - "express": "3.0", - "jade": "0.28.1", + "body-parser": "^1.13.3", + "express": "^4.13.2", + "jade": "^1.11.0", "mocha": "*", "should": "*" }, diff --git a/test/canvas.test.js b/test/canvas.test.js index 993f0c0..cb45811 100644 --- a/test/canvas.test.js +++ b/test/canvas.test.js @@ -76,10 +76,6 @@ module.exports = { } }, - 'test .PixelArray': function(){ - assert.equal(typeof Canvas.PixelArray, 'function'); - }, - 'test color serialization': function(){ var canvas = new Canvas(200, 200) , ctx = canvas.getContext('2d'); @@ -169,7 +165,7 @@ module.exports = { ctx.fillStyle = 'hsl(10, 100%, 42%)'; assert.equal('#d62400', ctx.fillStyle); - + ctx.fillStyle = 'hsl(370, 120%, 42%)'; assert.equal('#d62400', ctx.fillStyle); diff --git a/test/server.js b/test/server.js index 19e2350..d376e69 100644 --- a/test/server.js +++ b/test/server.js @@ -6,6 +6,7 @@ var express = require('express') , Canvas = require('../lib/canvas') , Image = Canvas.Image + , bodyParser = require('body-parser') , app = express(); // Config @@ -15,12 +16,8 @@ app.set('view engine', 'jade'); // Middleware -app.use(express.favicon()); -app.use(express.logger('dev')); -app.use(express.bodyParser()); -app.use(app.router); +app.use(bodyParser.json()); app.use(express.static(__dirname + '/public')); -app.use(express.errorHandler()); // Routes diff --git a/test/views/layout.jade b/test/views/layout.jade index 132827e..64c5567 100644 --- a/test/views/layout.jade +++ b/test/views/layout.jade @@ -1,4 +1,4 @@ -!!! +doctype html head title node-canvas