chore(windows): fix the test.transpiler.unittest task

This commit is contained in:
Marc Laval 2015-06-23 18:52:44 +02:00
parent 746efe7eba
commit 91d9e8d649
1 changed files with 5 additions and 3 deletions

View File

@ -101,9 +101,11 @@ describe('transpile to cjs', function() {
function compileAndWrite(input) {
var transpiledCode = compiler.compile(options, "test.js", input).js;
var tempFile = temp.openSync('ng2transpiler');
fs.writeSync(tempFile.fd, transpiledCode);
return tempFile.path;
var tempPath = temp.path({prefix: "ng2transpiler", suffix: ''});
var fd = fs.openSync(tempPath, 'w+');
fs.writeSync(fd, transpiledCode);
fs.closeSync(fd);
return tempPath.replace(/\\/g, '/');
}
it('should transpile export *', function() {