diff --git a/index.d.ts b/index.d.ts index 4af6fc99..2a628ade 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,26 +4,3 @@ declare namespace mitt { (all?: { [key: string]: Array }): Emitter; } } - -declare module 'delegated-events' { - type EventHandler = (event: Event) => any; - - type EventListenerOptions = { - capture?: boolean; - document?: Document; - }; - - export function on( - name: string, - selector: string, - handler: EventHandler, - options?: EventListenerOptions, - ): void; - export function off( - name: string, - selector: string, - handler: EventHandler, - options?: EventListenerOptions, - ): void; - export function fire(target: EventTarget, name: string, detail?: any): void; -} diff --git a/package.json b/package.json index aec62335..524079f1 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "@types/mocha": "^5.2.5", "@types/node": "^10.11.7", "@types/puppeteer": "^1.9.0", - "@types/rewire": "^2.5.28", "chai": "^4.2.0", "jest-snapshot": "^23.6.0", "mocha": "^5.2.0", diff --git a/test.d.ts b/test.d.ts index 0c1dca73..487e39a5 100644 --- a/test.d.ts +++ b/test.d.ts @@ -1,22 +1,3 @@ -declare module 'rollup-plugin-typescript' { - function typescript(): any; - export = typescript; -} - -declare module 'rollup-plugin-node-resolve' { - function resolve(): any; - export = resolve; -} - -declare module 'rollup-plugin-terser' { - export function terser(options?: any): any; -} - -declare module 'rollup-plugin-postcss' { - function postcss(options?: any): any; - export = postcss; -} - declare module 'jest-snapshot' { export class SnapshotState { constructor(testFile: string, options: any); diff --git a/test/integration.test.ts b/test/integration.test.ts index 1bb6c4cc..46458461 100644 --- a/test/integration.test.ts +++ b/test/integration.test.ts @@ -214,7 +214,12 @@ describe('record integration tests', () => { it('can record node mutations', async () => { const page: puppeteer.Page = await this.browser.newPage(); - await page.goto(`data:text/html,${getHtml.call(this, 'select2.html')}`, { + await page.goto('about:blank'); + // FIXME: use setContent directly when @types/puppeteer update + const setContent = async (html: string, options: any) => { + return page.setContent.call(page, html, options); + }; + await setContent(getHtml.call(this, 'select2.html'), { waitUntil: 'networkidle0', });