Permalink
Browse files

fix parallel test

  • Loading branch information...
1 parent 30159ed commit c9448268ec124002ab30ec2d047132b068cbf391 @thomaspeklak committed Mar 18, 2013
Showing with 9 additions and 9 deletions.
  1. +1 −1 package.json
  2. +8 −8 test/integration-test.js
View
@@ -1,6 +1,6 @@
{
"name": "express-resizer",
- "version": "0.0.1-pre3",
+ "version": "0.0.1",
"description": "Resizes images on the fly",
"main": "index.js",
"scripts": {
View
@@ -215,7 +215,7 @@ describe("resizer", function () {
var count = 0;
var cb = function () {
if(count++ == 5) {
- done();
+ fs.unlink(__dirname + "/test-out-images/profile.png", done);
}
};
@@ -228,27 +228,27 @@ describe("resizer", function () {
app.use(express.static(__dirname + "/test-images"));
request(app)
.get("/test-out-images/profile.png")
- .expect(200, cleanup(__dirname + "/test-out-images/profile.png", cb));
+ .expect(200, cb);
request(app)
.get("/test-out-images/profile.png")
- .expect(200, cleanup(__dirname + "/test-out-images/profile.png", cb));
+ .expect(200, cb);
request(app)
.get("/test-out-images/profile.png")
- .expect(200, cleanup(__dirname + "/test-out-images/profile.png", cb));
+ .expect(200, cb);
request(app)
.get("/test-out-images/profile.png")
- .expect(200, cleanup(__dirname + "/test-out-images/profile.png", cb));
+ .expect(200, cb);
request(app)
.get("/test-out-images/profile.png")
- .expect(200, cleanup(__dirname + "/test-out-images/profile.png", cb));
+ .expect(200, cb);
request(app)
.get("/test-out-images/profile.png")
- .expect(200, cleanup(__dirname + "/test-out-images/profile.png", cb));
+ .expect(200, cb);
});
it("should return the correct mime type", function (done) {
@@ -264,7 +264,7 @@ describe("resizer", function () {
request(app)
.get("/test-out-images/profile.png")
.expect("Content-type", "image/png")
- .expect(200, done);
+ .expect(200, cleanup(__dirname + "/test-out-images/profile.png", done));
});
});

0 comments on commit c944826

Please sign in to comment.