refactor: update inline-schema to import accessors
This commit is contained in:
@@ -102,8 +102,8 @@ describe('encounterDesert.csv import', () => {
|
||||
if (e.type === 'minion' || e.type === 'elite') {
|
||||
expect(Array.isArray(e.enemies)).toBe(true);
|
||||
expect(e.enemies.length).toBeGreaterThan(0);
|
||||
for (const [enemyId, bonusHp] of e.enemies) {
|
||||
expect(typeof enemyId).toBe('string');
|
||||
for (const [enemy, bonusHp] of e.enemies) {
|
||||
expect(typeof enemy === 'string' || typeof enemy === 'object').toBe(true);
|
||||
expect(typeof bonusHp).toBe('number');
|
||||
}
|
||||
}
|
||||
@@ -222,9 +222,9 @@ describe('enemyIntentDesert.csv import', () => {
|
||||
|
||||
it('should have effects with target, effect ref, and value', () => {
|
||||
for (const intent of enemyIntentDesertData) {
|
||||
for (const [target, effectId, value] of intent.effects) {
|
||||
for (const [target, effect, value] of intent.effects) {
|
||||
expect(target === 'self' || target === 'opponent').toBe(true);
|
||||
expect(typeof effectId).toBe('string');
|
||||
expect(typeof effect === 'string' || typeof effect === 'object').toBe(true);
|
||||
expect(typeof value).toBe('number');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user