Skip to content

Commit

Permalink
test: fix create-file test fixture
Browse files Browse the repository at this point in the history
This was failing if the file didn't already exist.

Fixes unit tests on Windows:

* test\simple\test-http-curl-chunk-problem.js
* test\simple\test-pipe-file-to-http.js
  • Loading branch information
orangemocha authored and indutny committed Dec 10, 2013
1 parent 7222539 commit f9e3364
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/fixtures/create-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ var fs = require('fs');
var file_name = process.argv[2];
var file_size = parseInt(process.argv[3]);

fs.truncateSync(file_name, file_size);
var fd = fs.openSync(file_name, 'w');
fs.ftruncateSync(fd, file_size);
fs.closeSync(fd);

0 comments on commit f9e3364

Please sign in to comment.