테스트 수정
This commit is contained in:
@@ -303,7 +303,7 @@ describe('Blank Start Scenario', () => {
|
|||||||
|
|
||||||
const resLevel = foundNationDef
|
const resLevel = foundNationDef
|
||||||
.buildConstraints(ctx, FOUNDING_ARGS)
|
.buildConstraints(ctx, FOUNDING_ARGS)
|
||||||
.find((c) => c.name === 'ReqCityLevel')
|
.find((c) => c.name === 'reqCityLevel')
|
||||||
?.test(ctx, view);
|
?.test(ctx, view);
|
||||||
expect(resLevel?.kind).toBe('deny');
|
expect(resLevel?.kind).toBe('deny');
|
||||||
});
|
});
|
||||||
@@ -318,15 +318,19 @@ describe('Blank Start Scenario', () => {
|
|||||||
const gen0 = world.getAllGenerals().find((g) => g.name === 'General_0')!;
|
const gen0 = world.getAllGenerals().find((g) => g.name === 'General_0')!;
|
||||||
|
|
||||||
const foundNationDef = foundNationSpec.createDefinition(systemEnv);
|
const foundNationDef = foundNationSpec.createDefinition(systemEnv);
|
||||||
// openingPartYear is 200, so 201 should fail
|
// startYear가 189였음
|
||||||
const year = 201;
|
const year = 190;
|
||||||
const ctx = createConstraintContext(gen0, year, FOUNDING_ARGS);
|
const ctx = createConstraintContext(gen0, year, FOUNDING_ARGS);
|
||||||
const view = createViewState(world, year);
|
const view = createViewState(world, year);
|
||||||
|
|
||||||
const resOpening = foundNationDef
|
let result = true;
|
||||||
.buildConstraints(ctx, FOUNDING_ARGS)
|
for (const constraint of foundNationDef.buildConstraints(ctx, FOUNDING_ARGS)) {
|
||||||
.find((c) => c.name === 'BeOpeningPart')
|
const res = constraint.test(ctx, view);
|
||||||
?.test(ctx, view);
|
if (res.kind === 'deny') {
|
||||||
expect(resOpening?.kind).toBe('deny');
|
result = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user