
























@@ -758,10 +758,10 @@ Successfully processed 1 files`;
758758isDir: false,
759759 env,
760760});
761-expect(result).not.toBeNull();
762-expect(result?.command).toBe(DEFAULT_ICACLS);
763-expect(result?.args).toContain("C:\\test\\file.txt");
764-expect(result?.args).toContain("/inheritance:r");
761+expect(result).toMatchObject({
762+ command: DEFAULT_ICACLS,
763+ args: expect.arrayContaining(["C:\\test\\file.txt", "/inheritance:r"]),
764+});
765765});
766766767767it("uses a validated SystemRoot for the structured command executable", () => {
@@ -781,9 +781,10 @@ Successfully processed 1 files`;
781781userInfo: mockUserInfo,
782782});
783783// Should return a valid command using the system username
784-expect(result).not.toBeNull();
785-expect(result?.command).toBe(DEFAULT_ICACLS);
786-expect(result?.args).toContain(`${MOCK_USERNAME}:F`);
784+expect(result).toMatchObject({
785+command: DEFAULT_ICACLS,
786+args: expect.arrayContaining([`${MOCK_USERNAME}:F`]),
787+});
787788});
788789789790it("includes display string matching formatIcaclsResetCommand", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。