Skip to content

Bun: When multiple test files, only 1 test file excecuted. #1

@ryoppippi

Description

@ryoppippi

To reproduce.

add.test.ts

import { test } from '@cross/test';
import {
    assertEquals
} from '@std/assert';


test('add', async() => {
  assertEquals(1 + 2, 3);
});

sub.test.ts

import { test } from '@cross/test';
import {
    assertEquals
} from '@std/assert';


test('sub', async() => {
  assertEquals(1 - 1, 0);
});

And then run the command below:

/t/buntest 57.9s ❱ bun test
bun test v1.1.12 (43f0913c)

sub.test.ts:
✓ sub [1.00ms]

add.test.ts:

 1 pass
 0 fail

Expected behaviorr

Both files should be excecuted.
When I change the code like this:

- import { test } from '@cross/test';
+ import { test} from 'bun:test';

It works fine.

/t/buntest 23.5s ❱ bun test
bun test v1.1.12 (43f0913c)

sub.test.ts:
✓ sub [0.29ms]

add.test.ts:
✓ add [0.02ms]

 2 pass
 0 fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions