scroll/src/bun/test_base.ts
Timothy J. Warren 2c21bf0c9b
All checks were successful
timw4mail/scroll/pipeline/head This commit looks good
Use node apis for test setup, refactor a bunch of runtime stuff
2024-07-11 17:27:49 -04:00

20 lines
524 B
JavaScript

/**
* Adapt the bun test interface to the shared testing interface
*/
import { describe, test } from 'bun:test';
import AbstractTestBase from '../common/runtime/test_base.ts';
class BunTestBase extends AbstractTestBase {
public static testSuite(testObj: any): void {
Object.keys(testObj).forEach((group) => {
describe(group, () => {
const groupObj = testObj[group];
Object.keys(groupObj).forEach((testName) => {
test(testName, groupObj[testName]);
});
});
});
}
}
export default BunTestBase;