Permalink
Browse files

wrapping cleanup in try-catch for tests

  • Loading branch information...
1 parent 9669904 commit 4e28059b3a9a691d917a17884237c16458a69eb5 @mashpie committed Mar 16, 2013
Showing with 10 additions and 6 deletions.
  1. +5 −3 test/i18n.configure.js
  2. +5 −3 test/i18n.defaults.js
View
@@ -22,9 +22,11 @@ describe('Module Config', function () {
var stats = fs.lstatSync('./customlocales');
should.exist(stats);
if (stats) {
- fs.unlinkSync('./customlocales/de.customextension');
- fs.unlinkSync('./customlocales/en.customextension');
- fs.rmdirSync('./customlocales');
+ try {
+ fs.unlinkSync('./customlocales/de.customextension');
+ fs.unlinkSync('./customlocales/en.customextension');
+ fs.rmdirSync('./customlocales');
+ } catch (e) {}
}
});
View
@@ -21,9 +21,11 @@ describe('Module Defaults', function () {
var stats = fs.lstatSync('./defaultlocales');
should.exist(stats);
if (stats) {
- fs.unlinkSync('./defaultlocales/de.json');
- fs.unlinkSync('./defaultlocales/en.json');
- fs.rmdirSync('./defaultlocales');
+ try {
+ fs.unlinkSync('./defaultlocales/de.json');
+ fs.unlinkSync('./defaultlocales/en.json');
+ fs.rmdirSync('./defaultlocales');
+ } catch (e) {}
}
});

0 comments on commit 4e28059

Please sign in to comment.