Skip to content

Commit 1dcd042

Browse files
committed
fixup! fs: fix flush regression from fast path
1 parent c751faf commit 1dcd042

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

test/parallel/test-fs-append-file-flush.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ test('synchronous version', async (t) => {
2626

2727
await t.test('performs flush', (t) => {
2828
const spy = t.mock.method(fs, 'fsyncSync');
29-
const checkCalls = (expected) => {
29+
const checkCalls = common.mustCall((expected) => {
3030
const calls = spy.mock.calls;
3131
assert.strictEqual(calls.length, expected);
3232
if (expected === 0) return;
3333
assert.strictEqual(calls.at(-1).result, undefined);
3434
assert.strictEqual(calls.at(-1).error, undefined);
3535
assert.strictEqual(calls.at(-1).arguments.length, 1);
3636
assert.strictEqual(typeof calls.at(-1).arguments[0], 'number');
37-
};
37+
}, 4);
3838

3939
const file = nextFile();
4040

test/parallel/test-fs-write-file-flush.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ test('synchronous version', async (t) => {
2626

2727
await t.test('performs flush', (t) => {
2828
const spy = t.mock.method(fs, 'fsyncSync');
29-
const checkCalls = (expected) => {
29+
const checkCalls = common.mustCall((expected) => {
3030
const calls = spy.mock.calls;
3131
assert.strictEqual(calls.length, expected);
3232
if (expected === 0) return;
3333
assert.strictEqual(calls.at(-1).result, undefined);
3434
assert.strictEqual(calls.at(-1).error, undefined);
3535
assert.strictEqual(calls.at(-1).arguments.length, 1);
3636
assert.strictEqual(typeof calls.at(-1).arguments[0], 'number');
37-
};
37+
}, 4);
3838

3939
const file = nextFile();
4040

0 commit comments

Comments
 (0)