Browse Source

Update test infrasturcture.

v1.x
Zach Bjornson 10 years ago
parent
commit
c3123efe55
  1. 5
      package.json
  2. 4
      test/canvas.test.js
  3. 7
      test/server.js
  4. 2
      test/views/layout.jade

5
package.json

@ -27,8 +27,9 @@
"nan": "^1.8.4" "nan": "^1.8.4"
}, },
"devDependencies": { "devDependencies": {
"express": "3.0", "body-parser": "^1.13.3",
"jade": "0.28.1", "express": "^4.13.2",
"jade": "^1.11.0",
"mocha": "*", "mocha": "*",
"should": "*" "should": "*"
}, },

4
test/canvas.test.js

@ -76,10 +76,6 @@ module.exports = {
} }
}, },
'test .PixelArray': function(){
assert.equal(typeof Canvas.PixelArray, 'function');
},
'test color serialization': function(){ 'test color serialization': function(){
var canvas = new Canvas(200, 200) var canvas = new Canvas(200, 200)
, ctx = canvas.getContext('2d'); , ctx = canvas.getContext('2d');

7
test/server.js

@ -6,6 +6,7 @@
var express = require('express') var express = require('express')
, Canvas = require('../lib/canvas') , Canvas = require('../lib/canvas')
, Image = Canvas.Image , Image = Canvas.Image
, bodyParser = require('body-parser')
, app = express(); , app = express();
// Config // Config
@ -15,12 +16,8 @@ app.set('view engine', 'jade');
// Middleware // Middleware
app.use(express.favicon()); app.use(bodyParser.json());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(app.router);
app.use(express.static(__dirname + '/public')); app.use(express.static(__dirname + '/public'));
app.use(express.errorHandler());
// Routes // Routes

2
test/views/layout.jade

@ -1,4 +1,4 @@
!!! doctype
html html
head head
title node-canvas title node-canvas

Loading…
Cancel
Save