Skip to content

fake beta ​

Function of @v12-engine/client/testing

ts
export declare function fake<T>(members: NoInfer<FakeOf<T>>): T;

A fake of T for a test: the members given (FakeOf), nothing else. What the code under test reads that is not given is undefined, as in a literal; the names and the arguments are checked against T's

ts
// fake, of `@v12-engine/client/testing`
const ground = fake<Terrain>({ heightAt: () => 2 })