Skip to content

Commit 91d9e8d

Browse files
committed
chore(windows): fix the test.transpiler.unittest task
1 parent 746efe7 commit 91d9e8d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tools/transpiler/unittest/transpilertests.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ describe('transpile to cjs', function() {
101101

102102
function compileAndWrite(input) {
103103
var transpiledCode = compiler.compile(options, "test.js", input).js;
104-
var tempFile = temp.openSync('ng2transpiler');
105-
fs.writeSync(tempFile.fd, transpiledCode);
106-
return tempFile.path;
104+
var tempPath = temp.path({prefix: "ng2transpiler", suffix: ''});
105+
var fd = fs.openSync(tempPath, 'w+');
106+
fs.writeSync(fd, transpiledCode);
107+
fs.closeSync(fd);
108+
return tempPath.replace(/\\/g, '/');
107109
}
108110

109111
it('should transpile export *', function() {

0 commit comments

Comments
 (0)