mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-24 00:35:31 +00:00
fix(eval-harness): preserve fixtures when recording fails
This commit is contained in:
1 parent
3f14a103a8
commit
f4261bd83c
2 files changed
+27
-1
No files matched your search
@@ -18,6 +18,7 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const { writeFileAtomic } = require('../atomic-write');
|
||||
const { canonicalJson, hashValue } = require('./canonical');
|
||||
const envelope = require('./envelope');
|
||||
|
||||
@@ -57,7 +58,7 @@ class FixtureStore {
|
||||
response_hash: hashValue(response),
|
||||
response,
|
||||
};
|
||||
fs.writeFileSync(this.pathFor(key), canonicalJson(record) + '\n', 'utf8');
|
||||
writeFileAtomic(this.pathFor(key), canonicalJson(record) + '\n');
|
||||
return record;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user