filesystem-sandbox 1.26.0 → 1.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -100,7 +100,16 @@ class Sandbox {
100
100
  async destroyFolderIfEmpty(p) {
101
101
  const contents = await (0, yafs_1.ls)(p);
102
102
  if (!contents.length) {
103
- await (0, yafs_1.rm)(p);
103
+ try {
104
+ await (0, yafs_1.rm)(p);
105
+ }
106
+ catch (e) {
107
+ // suppress: the method is literally
108
+ // "destroy folder if empty", and
109
+ // I sometimes see errors at CI where
110
+ // this folder isn't empty at the point
111
+ // of calling rm - likely a clash with another test
112
+ }
104
113
  }
105
114
  }
106
115
  async tryDestroySelf() {
@@ -233,7 +242,12 @@ class Sandbox {
233
242
  static async destroyAll() {
234
243
  const toDestroy = sandboxes.splice(0, sandboxes.length);
235
244
  for (const sandbox of toDestroy) {
236
- await sandbox.destroy();
245
+ try {
246
+ await sandbox.destroy();
247
+ }
248
+ catch (e) {
249
+ // suppress
250
+ }
237
251
  }
238
252
  }
239
253
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "filesystem-sandbox",
3
- "version": "1.26.0",
3
+ "version": "1.28.0",
4
4
  "description": "JavaScript module to provide filesystem sandboxes for testing",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",