Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun test crashing on windows #10830

Open
BioCla opened this issue May 4, 2024 · 0 comments
Open

Bun test crashing on windows #10830

BioCla opened this issue May 4, 2024 · 0 comments
Labels
bug Something isn't working crash An issue that could cause a crash

Comments

@BioCla
Copy link

BioCla commented May 4, 2024

How can we reproduce the crash?

reproduce by cloning the master branch from (https://git.dpaste.org/BioCla/futen) and running bun release:dry (crash on bun test)

The issue I suspect is coming from either the use of Glob patterns in the routesFrom function or from the new Request call in https://git.dpaste.org/BioCla/futen/src/commit/f7eb301e5430bb0bd8025ec9f534682025b26a2c/tests/middleware.test.ts#L308

JavaScript/TypeScript code that reproduces the crash?

In `futen\tests\middleware.test.ts` (https://git.dpaste.org/BioCla/futen/src/commit/f7eb301e5430bb0bd8025ec9f534682025b26a2c/tests/middleware.test.ts#L308-L317)

    test('runs middleware from file route', async () => {
        const server = new Futen(routesFrom('../examples'), { port: 0 });
        const response = await server.instance.fetch(
            new Request(`http://localhost:${server.instance.port}/fileRoute`)
        );
        expect(await response.json()).toEqual({ hello: 'world' });
        expect(response.headers.get('x-middleware')).toBe('true');

        server.instance.stop();
    });

Relevant log output

Bun v1.1.7 (b0b7db5c) Windows x64
Args: "C:\Users\brian\.bun\bin\bun.exe", "test"
Features: jsc http_server(10) tsconfig(2)
Elapsed: 285ms | User: 15ms | Sys: 15ms
RSS: 122.30MB | Peak: 122.30MB | Commit: 0.17GB | Faults: 30082

panic(main thread): Internal Error: Do not pass posix paths to Windows APIs, was given '\'.

Stack Trace (bun.report)

Bun v1.1.7 (b0b7db5) on windows x86_64 [TestCommand]

panic: Internal Error: Do not pass posix paths to Windows APIs, was given ''. Please open an issue on GitHub with a reproduction.

@BioCla BioCla added bug Something isn't working crash An issue that could cause a crash labels May 4, 2024
@BioCla BioCla changed the title Bun crashing on windows Bun test crashing on windows May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crash An issue that could cause a crash
Projects
None yet
Development

No branches or pull requests

1 participant