💄 Avoid duplicate temporary file names.

This commit is contained in:
Cheng Zhao 2013-08-29 18:03:14 +08:00
parent b1f30c1eb6
commit efd2bbbede
3 changed files with 5 additions and 3 deletions

View file

@ -14,7 +14,7 @@ describe 'window module', ->
if (!isLoading)
w.close()
w.on 'destroyed', ->
test = path.join(fixtures, 'api', 'test')
test = path.join(fixtures, 'api', 'unload')
content = fs.readFileSync(test)
fs.unlinkSync(test)
assert.equal String(content), 'unload'
@ -41,8 +41,10 @@ describe 'window module', ->
assert.equal isLoading, true
else if count == 1
assert.equal isLoading, false
w.close()
done()
else
w.close()
assert false
++count