Skip to content

Commit fc853d2

Browse files
committed
stub generate impl
1 parent 0c5ddd9 commit fc853d2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/docusaurus-utils/src/__tests__/emitUtils.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ describe('readOutputHTMLFile', () => {
120120
});
121121

122122
describe('generate', () => {
123-
const writeMock = vi.spyOn(fs, 'outputFile');
123+
const writeMock = vi.spyOn(fs, 'outputFile').mockImplementation(() => {});
124124
const existsMock = vi.spyOn(fs, 'pathExists');
125125
const readMock = vi.spyOn(fs, 'readFile');
126126

@@ -141,7 +141,6 @@ describe('generate', () => {
141141

142142
it('works with existing file but no cache', async () => {
143143
existsMock.mockImplementationOnce(() => true);
144-
// @ts-expect-error: seems the typedef doesn't understand overload
145144
readMock.mockImplementationOnce(() => Promise.resolve('bar'));
146145
await generate(__dirname, 'baz', 'bar');
147146
expect(writeMock).toHaveBeenCalledTimes(1);

0 commit comments

Comments
 (0)