From 402c6c9445937080d4469e98e2a3f0510c6850d7 Mon Sep 17 00:00:00 2001 From: Russell Dempsey <1173416+SgtPooki@users.noreply.github.com> Date: Thu, 24 Oct 2024 14:19:30 -0500 Subject: [PATCH] chore: bun test passing now, remove polyfill --- examples/helia-101/test/index.spec.js | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/examples/helia-101/test/index.spec.js b/examples/helia-101/test/index.spec.js index 945cc381..42dbf4dc 100644 --- a/examples/helia-101/test/index.spec.js +++ b/examples/helia-101/test/index.spec.js @@ -2,26 +2,6 @@ import path from 'node:path' import { fileURLToPath } from 'node:url' import { waitForOutput } from 'test-ipfs-example/node' -/** - * @see https://bun.sh/guides/util/detect-bun - */ -if (process.versions.bun) { - // eslint-disable-next-line no-console - console.log('Running tests with bun') - /** - * Polyfill required for bun for now - * - * @see https://github.com/ipfs-examples/helia-examples/pull/101#issuecomment-2436128883 - */ - globalThis.CustomEvent = globalThis.CustomEvent ?? class CustomEventPolyfill extends Event { - constructor (message, data) { - super(message, data) - // @ts-expect-error could be undefined - this.detail = data?.detail - } - } -} - const __dirname = path.dirname(fileURLToPath(import.meta.url)) await waitForOutput('Added file contents: Hello World 101', 'node', [path.resolve(__dirname, '../101-basics.js')])