fix: handle edge object in serialization tests
Add `typecheck` script to package.json, expand tsconfig include paths to cover tests and examples, and update serialization tests to correctly resolve player IDs from relationship edges.
This commit is contained in:
@@ -277,7 +277,9 @@ describe("Serialization — complex state", () => {
|
||||
const comps = snap.entities[id];
|
||||
return comps.position && comps.velocity && !comps.health;
|
||||
})!;
|
||||
const playerId = snap.relationships.ownedBy[bulletId];
|
||||
const playerEdge = snap.relationships.ownedBy[bulletId];
|
||||
const playerId =
|
||||
typeof playerEdge === "string" ? playerEdge : playerEdge.target;
|
||||
|
||||
// Player should have a name
|
||||
const playerComps = snap.entities[playerId];
|
||||
|
||||
Reference in New Issue
Block a user