Skip to content

Commit 849eff2

Browse files
author
github-actions-bot
committed
Fix the tests
1 parent 05e0408 commit 849eff2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/utils/dex/functions.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ describe('Dex utils function tests', () => {
130130
describe('createFormMap', () => {
131131
test('should add an ID to an existing form array', () => {
132132
const formMap = { 25: [1, 2, 3] };
133-
const currentPokemon = { monsno: 25, id: 4 };
133+
const currentPokemon = { monsno: 25, id: 4, valid_flag: 1 };
134134
const expectedFormMap = { 25: [1, 2, 3, 4] };
135135
const actualFormMap = createFormMap(formMap, currentPokemon);
136136
expect(actualFormMap).toEqual(expectedFormMap);
137137
});
138138

139139
test('should create a new form array if none exists for the monsno', () => {
140140
const formMap = { 25: [1, 2, 3] };
141-
const currentPokemon = { monsno: 700, id: 1 };
141+
const currentPokemon = { monsno: 700, id: 1, valid_flag: 1 };
142142
const expectedFormMap = { 25: [1, 2, 3], 700: [1] };
143143
const actualFormMap = createFormMap(formMap, currentPokemon);
144144
expect(actualFormMap).toEqual(expectedFormMap);

src/utils/dex/name.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ describe('Dex utils Name getters', () => {
134134
it('should return the correct index for a valid form ID', () => {
135135
expect(getPokemonFormId(25, 1027)).toBe(1);
136136
expect(getPokemonFormId(133, 133)).toBe(0);
137-
expect(getPokemonFormId(800, 1353)).toBe(2);
137+
expect(getPokemonFormId(493, 1200)).toBe(8);
138138
});
139139

140140
it('should return -1 for an invalid form ID', () => {

0 commit comments

Comments
 (0)