enable tests
This commit is contained in:
parent
478a0339d2
commit
9a5225fcfa
1 changed files with 23 additions and 23 deletions
|
@ -115,32 +115,32 @@ describe('query', () => {
|
|||
const [edge] = relate(world, player, Damaged, enemy)
|
||||
update(Damaged, { damage: 10 }, edge)
|
||||
|
||||
// assert.deepEqual(
|
||||
// query('MATCH (e, h:Health) WHERE h.current < 30 RETURN e, h.max', engine).unwrap(),
|
||||
// [{ e: 12, h: { max: 50 } }]
|
||||
// )
|
||||
assert.deepEqual(
|
||||
query('MATCH (e, h:Health) WHERE h.current < 30 RETURN e, h.max', engine).unwrap(),
|
||||
[{ e: 12, h: { max: 50 } }]
|
||||
)
|
||||
|
||||
// assert.deepEqual(
|
||||
// query('MATCH (e, h:Health) WHERE e = 13 AND h.max = 50 OR h.current < 25 RETURN e, h.max', engine).unwrap(),
|
||||
// [{ e: 13, h: { max: 50 } }]
|
||||
// )
|
||||
assert.deepEqual(
|
||||
query('MATCH (e, h:Health) WHERE e = 13 AND h.max = 50 OR h.current < 25 RETURN e, h.max', engine).unwrap(),
|
||||
[{ e: 13, h: { max: 50 } }]
|
||||
)
|
||||
|
||||
// assert.deepEqual(
|
||||
// query('MATCH (e, h:Health) WHERE h.max = 50 OR h.current > 45 RETURN e, h.max AS maxHealth', engine).unwrap(),
|
||||
// [
|
||||
// { e: 12, maxHealth: 50 },
|
||||
// { e: 13, maxHealth: 50 }
|
||||
// ]
|
||||
// )
|
||||
// assert.deepEqual(
|
||||
// query('MATCH (e, :Player, h:Health) WHERE (h.max = 50 OR h.current > 45) AND e = 12 RETURN e, h.max AS maxHealth', engine).unwrap(),
|
||||
// [{ e: 12, maxHealth: 50 }]
|
||||
// )
|
||||
assert.deepEqual(
|
||||
query('MATCH (e, h:Health) WHERE h.max = 50 OR h.current > 45 RETURN e, h.max AS maxHealth', engine).unwrap(),
|
||||
[
|
||||
{ e: 12, maxHealth: 50 },
|
||||
{ e: 13, maxHealth: 50 }
|
||||
]
|
||||
)
|
||||
assert.deepEqual(
|
||||
query('MATCH (e, :Player, h:Health) WHERE (h.max = 50 OR h.current > 45) AND e = 12 RETURN e, h.max AS maxHealth', engine).unwrap(),
|
||||
[{ e: 12, maxHealth: 50 }]
|
||||
)
|
||||
|
||||
// assert.deepEqual(
|
||||
// query('MATCH (:Player)-[d:Damaged]->(h:Health) RETURN h.current AS health, d.damage AS damage', engine).unwrap(),
|
||||
// [{ damage: 10, health: 35 }]
|
||||
// )
|
||||
assert.deepEqual(
|
||||
query('MATCH (:Player)-[d:Damaged]->(h:Health) RETURN h.current AS health, d.damage AS damage', engine).unwrap(),
|
||||
[{ damage: 10, health: 35 }]
|
||||
)
|
||||
|
||||
update(Damaged, { damage: 50 }, edge)
|
||||
assert.deepEqual(
|
||||
|
|
Loading…
Reference in a new issue