Skip to content

Commit 982e916

Browse files
committed
Fix single-instance failed on window
1 parent 975c488 commit 982e916

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tests/automatic_tests/single_instance/mocha_test.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,13 @@ describe('single-instance', function() {
6565
before(function(done) {
6666
make_execuable_file('single_instance/mul', done);
6767
});
68-
68+
69+
after(function() {
70+
fs.remove('tmp-nw', function (er) {
71+
if (er) throw er;
72+
});
73+
});
74+
6975
it('should have a instance', function(done) {
7076
check_have(0, execPath, "", 'not have a instance', 0, done);
7177
});
@@ -91,15 +97,15 @@ describe('single-instance', function() {
9197
describe('single-instance default', function() {
9298

9399
before(function(done) {
94-
make_execuable_file('single_instance/single', done);
100+
setTimeout(function() {
101+
make_execuable_file('single_instance/single', done);
102+
}, 2000);
95103
});
96104

97105
after(function() {
98-
setTimeout(function() {
99-
fs.remove('tmp-nw', function (er) {
100-
if (er) throw er;
101-
})
102-
}, 1000);
106+
fs.remove('tmp-nw', function (er) {
107+
if (er) throw er;
108+
});
103109
});
104110

105111
it('should have a instance', function(done) {

0 commit comments

Comments
 (0)