chore(sim): review nits
This commit is contained in:
1 parent
0fc2133e40
commit
3a8a110a2e
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -30,7 +30,7 @@ export function createCatalog(games: Game[]): Catalog {
|
||||
const byId = new Map<string, Game>();
|
||||
for (const g of games) {
|
||||
if (byId.has(g.id)) throw new Error(`Duplicate game id: ${g.id}`);
|
||||
if (g.launchPriceCents <= 0) throw new Error(`Invalid launch price: ${g.id}`);
|
||||
if (!(g.launchPriceCents > 0)) throw new Error(`Invalid launch price: ${g.id}`);
|
||||
byId.set(g.id, g);
|
||||
}
|
||||
return { games, byId };
|
||||
|
||||
@@ -166,8 +166,9 @@ describe('requests', () => {
|
||||
recordSatisfiedRequest(s);
|
||||
expect(s.reputation).toBe(20.5);
|
||||
});
|
||||
});
|
||||
|
||||
describe('review fixes', () => {
|
||||
describe('reward and cash edge cases', () => {
|
||||
it('keeps the free trade reward when there is no difference to waive', () => {
|
||||
const s = createNewGame(1);
|
||||
const card = issueCard(s.loyalty);
|
||||
@@ -197,4 +198,3 @@ describe('review fixes', () => {
|
||||
expect(s.day.trades).toBe(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user