diff --git a/test/e2e/generate-types.test.ts b/test/e2e/generate-types.test.ts index e0ee905a..1164dabf 100644 --- a/test/e2e/generate-types.test.ts +++ b/test/e2e/generate-types.test.ts @@ -122,9 +122,13 @@ describe('Type-generation', () => { tmpfile: outFileComplex, } satisfies ts.server.protocol.SavetoRequestArgs); + server.sendCommand('saveto', { + file: outFileComplex, + tmpfile: outFileComplex, + } satisfies ts.server.protocol.SavetoRequestArgs); + await waitForExpect(() => { const contents = fs.readFileSync(outFileComplex, 'utf-8'); - console.log('gen complex', [...server.responses], contents); expect(contents).toContain(` id } \` as typeof import('./rename-complex.generated').PostFieldsFragmentDoc`); diff --git a/test/e2e/util.ts b/test/e2e/util.ts index a8a47976..7f9724b2 100644 --- a/test/e2e/util.ts +++ b/test/e2e/util.ts @@ -7,7 +7,7 @@ type WaitForExpectOptions = { export const waitForExpect = async ( expectFn: () => void, - { interval = 500, timeout = 20000 }: WaitForExpectOptions = {} + { interval = 2000, timeout = 30000 }: WaitForExpectOptions = {} ) => { // @sinonjs/fake-timers injects `clock` property into setTimeout const usesFakeTimers = 'clock' in setTimeout;