Skip to content

Commit

Permalink
Copy test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kpdecker committed Nov 18, 2012
1 parent 224d031 commit 723c313
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"devDependencies": {
"mocha": "~1.7",
"should": "*",
"stylus": ">=0.24"
"stylus": ">=0.24",
"wrench": "*"
}
}
10 changes: 8 additions & 2 deletions test/copy-files.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var fs = require('fs'),
stylus = require('stylus'),
stylusImage = require('..');
stylusImage = require('..'),
wrench = require('wrench');

function runTest(test, expected, imagePath, options, done) {
stylus(test, options)
Expand All @@ -21,7 +22,12 @@ function runTest(test, expected, imagePath, options, done) {
}

describe('copy file', function() {
fs.mkdir('/tmp/stylus-images', parseInt('0777', 8));
before(function() {
fs.mkdir('/tmp/stylus-images', parseInt('0777', 8));
});
after(function() {
wrench.rmdirSyncRecursive('/tmp/stylus-images');
});

it('copy large files', function(done) {
runTest(
Expand Down

0 comments on commit 723c313

Please sign in to comment.