Skip to content

Commit 9f249b8

Browse files
committed
shorter mock little polish
1 parent 0846d72 commit 9f249b8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/integration-local/feature-toggles.integration.test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,7 @@ describe("local integration test", () => {
224224
const configForConflict = Object.fromEntries(
225225
[firstEntry].map(([key]) => [key, { type: "number", fallbackValue: 0 }])
226226
);
227-
mockReadFile.mockImplementationOnce((filepath, callback) =>
228-
callback(null, Buffer.from(JSON.stringify(configForFile)))
229-
);
227+
mockReadFile.mockImplementationOnce((path, cb) => cb(null, Buffer.from(JSON.stringify(configForFile))));
230228
const checkKey = firstEntry[0];
231229

232230
await expect(
@@ -245,9 +243,7 @@ describe("local integration test", () => {
245243
});
246244

247245
test("init config works for runtime file auto simultaneously", async () => {
248-
mockReadFile.mockImplementationOnce((filepath, callback) =>
249-
callback(null, Buffer.from(JSON.stringify(configForFile)))
250-
);
246+
mockReadFile.mockImplementationOnce((path, cb) => cb(null, Buffer.from(JSON.stringify(configForFile))));
251247

252248
await expect(
253249
toggles.initializeFeatures({ config: configForRuntime, configFile: "toggles.json", configAuto: configForAuto })

0 commit comments

Comments
 (0)