chore: 添加第三方依赖库
This commit is contained in:
23
thirdparty/rapier.js/rapier-compat/tests/World2d.test.ts
vendored
Normal file
23
thirdparty/rapier.js/rapier-compat/tests/World2d.test.ts
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import {init, Vector2, World} from "../builds/2d-deterministic/pkg";
|
||||
|
||||
describe("2d/World", () => {
|
||||
let world: World;
|
||||
|
||||
beforeAll(init);
|
||||
|
||||
afterAll(async () => {
|
||||
await Promise.resolve();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
world = new World(new Vector2(0, 9.8));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
world.free();
|
||||
});
|
||||
|
||||
test("constructor", () => {
|
||||
expect(world.colliders.len()).toBe(0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user