From 91d9e8d649032ed86a384d657a1e7bf3ae01f36c Mon Sep 17 00:00:00 2001 From: Marc Laval Date: Tue, 23 Jun 2015 18:52:44 +0200 Subject: [PATCH] chore(windows): fix the test.transpiler.unittest task --- tools/transpiler/unittest/transpilertests.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/transpiler/unittest/transpilertests.js b/tools/transpiler/unittest/transpilertests.js index 6733e177cc..e7fff5dca6 100644 --- a/tools/transpiler/unittest/transpilertests.js +++ b/tools/transpiler/unittest/transpilertests.js @@ -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() {