California gets roads, traffic, and a car to follow
This commit is contained in:
+28
-8
@@ -444,13 +444,14 @@ describe("the Frontier Valley pack", () => {
|
||||
});
|
||||
|
||||
/**
|
||||
* Both shipped packs declare where they stand, and the two are deliberately
|
||||
* All shipped packs declare where they stand, and the three are deliberately
|
||||
* nothing alike — which is the entire argument for the field existing.
|
||||
*/
|
||||
describe("the sites", () => {
|
||||
it("are both declared", () => {
|
||||
assert.ok(LUMBRIDGE_HQ.site, "Lumbridge HQ has no site");
|
||||
assert.ok(FRONTIER_VALLEY.site, "Frontier Valley has no site");
|
||||
const packs = [LUMBRIDGE_HQ, FRONTIER_VALLEY, MATEO_COURT];
|
||||
|
||||
it("are all declared", () => {
|
||||
for (const pack of packs) assert.ok(pack.site, `${pack.name} has no site`);
|
||||
});
|
||||
|
||||
it("put one high in the air and one on the ground", () => {
|
||||
@@ -465,15 +466,15 @@ describe("the sites", () => {
|
||||
});
|
||||
|
||||
it("carry headings inside the compass", () => {
|
||||
for (const pack of [LUMBRIDGE_HQ, FRONTIER_VALLEY, MATEO_COURT]) {
|
||||
for (const pack of packs) {
|
||||
const h = pack.site?.heading ?? 0;
|
||||
assert.ok(h >= 0 && h < 360, `${pack.id} has a heading of ${h}`);
|
||||
}
|
||||
});
|
||||
|
||||
it("are both on the board the city view draws", () => {
|
||||
// Not a format requirement — an office may stand anywhere — but both of
|
||||
// these are meant to be places in *this* product's San Francisco, and a
|
||||
it("puts the Bay Area offices on the board the city view draws", () => {
|
||||
// Not a format requirement — an office may stand anywhere — but these two
|
||||
// are meant to be places in *this* product's San Francisco, and a
|
||||
// coordinate typo that put one in Nevada would otherwise render fine.
|
||||
for (const pack of [LUMBRIDGE_HQ, FRONTIER_VALLEY]) {
|
||||
const site = pack.site;
|
||||
@@ -482,6 +483,25 @@ describe("the sites", () => {
|
||||
assert.ok(site.lng > -122.8 && site.lng < -121.8, `${pack.id} longitude ${site.lng}`);
|
||||
}
|
||||
});
|
||||
|
||||
it("gives every map destination a finite, aligned exterior glyph", () => {
|
||||
for (const pack of packs) {
|
||||
const site = pack.site;
|
||||
assert.ok(site, `${pack.id} has no site`);
|
||||
const exterior = site.exterior;
|
||||
assert.ok(exterior, `${pack.id} has no exterior glyph`);
|
||||
assert.equal(exterior.kind, "building");
|
||||
assert.equal(exterior.heading, site.heading, `${pack.id} exterior faces away from its plan`);
|
||||
for (const [field, value] of Object.entries({
|
||||
width: exterior.width,
|
||||
depth: exterior.depth,
|
||||
height: exterior.height,
|
||||
storeys: exterior.storeys,
|
||||
})) {
|
||||
assert.ok(Number.isFinite(value) && value > 0, `${pack.id} has invalid ${field}: ${value}`);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user