@mintlify/cli 4.0.919 → 4.0.927
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.
- package/__test__/update.test.ts +7 -3
- package/bin/tsconfig.build.tsbuildinfo +1 -1
- package/bin/update.js +4 -3
- package/package.json +8 -8
- package/src/update.tsx +16 -3
package/__test__/update.test.ts
CHANGED
|
@@ -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(
|
|
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(
|
|
105
|
-
|
|
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
|
});
|