Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

wrapping cleanup in try-catch for tests

  • Loading branch information...
commit 4e28059b3a9a691d917a17884237c16458a69eb5 1 parent 9669904
@mashpie authored
Showing with 10 additions and 6 deletions.
  1. +5 −3 test/i18n.configure.js
  2. +5 −3 test/i18n.defaults.js
View
8 test/i18n.configure.js
@@ -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
8 test/i18n.defaults.js
@@ -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) {}
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.