NEO-139: fix Bruno default test playerId env lookup.
Use getEnvVar fallback so CI Local environment resolves playerId in test assertions.pull/179/head
parent
0fe182565e
commit
0dfc17486e
|
|
@ -22,7 +22,7 @@ tests {
|
||||||
expect(res.getHeader("content-type")).to.contain("application/json");
|
expect(res.getHeader("content-type")).to.contain("application/json");
|
||||||
const body = res.getBody();
|
const body = res.getBody();
|
||||||
expect(body.schemaVersion).to.equal(1);
|
expect(body.schemaVersion).to.equal(1);
|
||||||
expect(body.playerId).to.equal(bru.getVar("playerId"));
|
expect(body.playerId).to.equal(bru.getEnvVar("playerId") || bru.getVar("playerId") || "dev-local-1");
|
||||||
expect(body.factions).to.be.an("array");
|
expect(body.factions).to.be.an("array");
|
||||||
expect(body.factions.length).to.equal(2);
|
expect(body.factions.length).to.equal(2);
|
||||||
const byId = Object.fromEntries(body.factions.map((row) => [row.id, row.standing]));
|
const byId = Object.fromEntries(body.factions.map((row) => [row.id, row.standing]));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue