Skip to content

Commit 8138edf

Browse files
codeman9cameroncooke
authored andcommitted
fix: replace vi.fn() with createMockExecutor in build-utils-suppress-warnings.test.ts
1 parent 19f7231 commit 8138edf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/utils/__tests__/build-utils-suppress-warnings.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { describe, it, expect, vi, beforeEach } from 'vitest';
1+
import { describe, it, expect, beforeEach } from 'vitest';
22
import { executeXcodeBuildCommand } from '../build-utils.ts';
33
import { XcodePlatform } from '../../types/common.ts';
44
import { sessionStore } from '../session-store.ts';
5+
import { createMockExecutor } from '../../test-utils/mock-executors.ts';
56

67
describe('executeXcodeBuildCommand - suppressWarnings', () => {
78
beforeEach(() => {
@@ -11,7 +12,7 @@ describe('executeXcodeBuildCommand - suppressWarnings', () => {
1112
it('should include warnings when suppressWarnings is false', async () => {
1213
sessionStore.setDefaults({ suppressWarnings: false });
1314

14-
const mockExecutor = vi.fn().mockResolvedValue({
15+
const mockExecutor = createMockExecutor({
1516
success: true,
1617
output: 'warning: Some warning\nerror: Some error',
1718
error: '',
@@ -44,7 +45,7 @@ describe('executeXcodeBuildCommand - suppressWarnings', () => {
4445
it('should suppress warnings when suppressWarnings is true', async () => {
4546
sessionStore.setDefaults({ suppressWarnings: true });
4647

47-
const mockExecutor = vi.fn().mockResolvedValue({
48+
const mockExecutor = createMockExecutor({
4849
success: true,
4950
output: 'warning: Some warning\nerror: Some error',
5051
error: '',

0 commit comments

Comments
 (0)