()
| 116 | } |
| 117 | |
| 118 | writeFile() { |
| 119 | try { |
| 120 | const keys = ArrayPrototypeSort(ObjectKeys(this.snapshots)); |
| 121 | const snapshotStrings = ArrayPrototypeMap(keys, (key) => { |
| 122 | return `exports[\`${key}\`] = \`${this.snapshots[key]}\`;\n`; |
| 123 | }); |
| 124 | const output = ArrayPrototypeJoin(snapshotStrings, '\n'); |
| 125 | mkdirSync(dirname(this.snapshotFile), { __proto__: null, recursive: true }); |
| 126 | writeFileSync(this.snapshotFile, output, 'utf8'); |
| 127 | } catch (err) { |
| 128 | throwWriteError(err, this.snapshotFile); |
| 129 | } |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | class SnapshotManager { |
no test coverage detected