mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-26 18:35:05 +00: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:
1 parent
1b12e19c63
commit
c2405149f7
1 file changed
+3
-1
@@ -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