oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
74.16k stars 2.77k forks source link

Bun complains about duplicated import #13715

Open FelixZY opened 2 months ago

FelixZY commented 2 months ago

https://github.com/oven-sh/bun/blob/5108e3e0d9f7806c3884e5a678a81dedd61791bc/test/js/node/http/node-http.test.ts#L15-L17

bun test v1.1.26 (0a37423b)

my.test.js:

# Unhandled error between tests
-------------------------------
17 | import { createServer as createHttpsServer } from "node:https";
              ^
error: "createHttpsServer" has already been declared
    at /<redacted>/my.test.js:17:10

15 | import https, { createServer as createHttpsServer } from "node:https";
                     ^
note: "createHttpsServer" was originally declared here
   at /<redacted>/my.test.js:15:17
-------------------------------

 0 pass
 1 fail
 1 error
Ran 1 tests across 1 files. [9.00ms]
sequencerr commented 2 months ago

i guess line 17 is redundant

Jarred-Sumner commented 2 months ago

so you're right, but i'm not able to reproduce it throwing an error at start for some reason.