@mintlify/cli 4.0.918 → 4.0.926

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,6 +28,7 @@ vi.mock('../src/helpers.js', async () => {
28
28
  });
29
29
 
30
30
  const addLogSpy = vi.spyOn(previewing, 'addLog');
31
+ const addErrorLogSpy = vi.spyOn(previewing, 'addErrorLog');
31
32
 
32
33
  describe('update', () => {
33
34
  beforeEach(() => {
@@ -94,15 +95,18 @@ describe('update', () => {
94
95
 
95
96
  await update({ packageName: 'mintlify' });
96
97
 
97
- expect(addLogSpy).toHaveBeenCalledTimes(3);
98
+ expect(addLogSpy).toHaveBeenCalledTimes(2);
98
99
  expect(addLogSpy).toHaveBeenCalledWith(
99
100
  expect.objectContaining({ props: { message: 'updating...' } })
100
101
  );
101
102
  expect(addLogSpy).toHaveBeenCalledWith(
102
103
  expect.objectContaining({ props: { message: 'updating mintlify package...' } })
103
104
  );
104
- expect(addLogSpy).toHaveBeenCalledWith(
105
- expect.objectContaining({ props: { message: 'failed to update mintlify@latest' } })
105
+ expect(addErrorLogSpy).toHaveBeenCalledTimes(1);
106
+ expect(addErrorLogSpy).toHaveBeenCalledWith(
107
+ expect.objectContaining({
108
+ props: { message: 'Failed to update mintlify@2.0.0 using npm: Update failed' },
109
+ })
106
110
  );
107
111
  });
108
112
  });