Skip to content

Commit

Permalink
Merge pull request #1267 from kingFighter/crash_dump_test
Browse files Browse the repository at this point in the history
[test] fix crashBrowser case
  • Loading branch information
rogerwang committed Oct 31, 2013
2 parents f090bd3 + a39a02c commit 9237e4d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Expand Up @@ -6,7 +6,7 @@ var fs_extra = require('fs-extra');
var spawn = require('child_process').spawn;
var result;

describe('afterpp close previous window then open new', function() {
describe('after close previous window then open new', function() {
after(function () {
fs_extra.remove('./automatic_tests/after_close_previous_window_then_open_new/tmp', function (er) {
if (er) throw er;
Expand Down
16 changes: 11 additions & 5 deletions tests/automatic_tests/crash_dump/mocha_test.js
Expand Up @@ -5,11 +5,15 @@ var fs = require('fs');
var fs_extra = require('fs-extra');
var results;
describe('crash dump', function() {

before(function(done) {
fs.mkdirSync('./automatic_tests/crash_dump/tmp');
done();
});

after(function () {
fs_extra.remove('./automatic_tests/crash_dump/tmp', function (er) {
fs_extra.remove('./automatic_tests/crash_dump/tmp', function (er) {
if (er) throw er;
});
});
});

describe('crashBrowser()', function() {
Expand All @@ -20,8 +24,10 @@ describe('crash dump', function() {
appPath: path.join(global.tests_dir, 'crash_dump'),
args:[0],
end: function(data, app) {
result = fs.readdirSync('./automatic_tests/crash_dump/tmp');
done();
setTimeout(function() {
result = fs.readdirSync('./automatic_tests/crash_dump/tmp');
done();
}, 2000);
}
});
});
Expand Down

0 comments on commit 9237e4d

Please sign in to comment.