@@ -2,6 +2,7 @@ var common = require('../common');
22var assert = common . assert ;
33var FormData = require ( common . dir . lib + '/form_data' ) ;
44var fake = require ( 'fake' ) . create ( ) ;
5+ var path = require ( 'path' ) ;
56var fs = require ( 'fs' ) ;
67var http = require ( 'http' ) ;
78
@@ -66,16 +67,17 @@ var http = require('http');
6667( function testStreamError ( ) {
6768 var req ;
6869 var form = new FormData ( ) ;
69- var path = '/why/u/no/exists' ;
70- var src = fs . createReadStream ( path ) ;
70+ // make it windows friendly
71+ var fakePath = path . resolve ( '/why/u/no/exists' ) ;
72+ var src = fs . createReadStream ( fakePath ) ;
7173 var server = http . createServer ( ) ;
7274 var addr = 'http://localhost:' + common . port ;
7375
7476 form . append ( 'fake-stream' , src ) ;
7577
7678 form . on ( 'error' , function ( err ) {
7779 assert . equal ( err . code , 'ENOENT' ) ;
78- assert . equal ( err . path , path ) ;
80+ assert . equal ( err . path , fakePath ) ;
7981 req . on ( 'error' , function ( ) { } ) ;
8082 server . close ( ) ;
8183 } ) ;
0 commit comments