mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-20 16:47:59 +02:00
test(metrics): make snapshot mode assertion portable
Skip POSIX permission-bit equality on Windows, where stat reports synthesized mode bits, while retaining the atomic publication and readback assertions on every platform.
This commit is contained in:
@@ -46,7 +46,9 @@ try {
|
||||
assert.strictEqual(appendSessionCostRow(root, 'session-1', current), true);
|
||||
const filePath = getCostSnapshotPath(root, 'session-1');
|
||||
assert.deepStrictEqual(readSessionCostSnapshot(root, 'session-1').row, current);
|
||||
assert.strictEqual(fs.statSync(filePath).mode & 0o777, 0o600);
|
||||
if (process.platform !== 'win32') {
|
||||
assert.strictEqual(fs.statSync(filePath).mode & 0o777, 0o600);
|
||||
}
|
||||
assert.deepStrictEqual(
|
||||
fs.readdirSync(path.dirname(filePath)).filter(name => name.endsWith('.tmp')),
|
||||
[]
|
||||
|
||||
Reference in New Issue
Block a user