lint: fix biome issues in new test files and helpers
This commit is contained in:
1 parent
99eb3af17b
commit
93862c2275
41 files changed
+488
-314
No files matched your search
@@ -53,10 +53,26 @@ describe("updateReferralSettings", () => {
|
||||
});
|
||||
|
||||
expect(mockRequirePermission).toHaveBeenCalledWith("admin.referrals.edit");
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(1, "referrals_needed", "5");
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(2, "referral_reward_amount", "100");
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(3, "referral_reward_currency_type", "duckets");
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(4, "referrals_block_same_ip", "1");
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(
|
||||
1,
|
||||
"referrals_needed",
|
||||
"5",
|
||||
);
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(
|
||||
2,
|
||||
"referral_reward_amount",
|
||||
"100",
|
||||
);
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(
|
||||
3,
|
||||
"referral_reward_currency_type",
|
||||
"duckets",
|
||||
);
|
||||
expect(mockSiteSettingUpdate).toHaveBeenNthCalledWith(
|
||||
4,
|
||||
"referrals_block_same_ip",
|
||||
"1",
|
||||
);
|
||||
expect(mockRevalidatePath).toHaveBeenCalledWith("/admin/referrals");
|
||||
expect(result).toEqual({ ok: true, data: {} });
|
||||
});
|
||||
@@ -112,7 +128,10 @@ describe("updateReferralSettings", () => {
|
||||
rewardCurrency: "credits",
|
||||
blockSameIp: "0",
|
||||
});
|
||||
expect(result).toEqual({ ok: false, error: "Reward amount must be positive" });
|
||||
expect(result).toEqual({
|
||||
ok: false,
|
||||
error: "Reward amount must be positive",
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects an unsupported reward currency", async () => {
|
||||
@@ -158,4 +177,4 @@ describe("updateReferralSettings", () => {
|
||||
});
|
||||
expect(mockRevalidatePath).not.toHaveBeenCalled();
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user