Skip to content

Commit 603ca2d

Browse files
committed
feat(world): updates to support new data center and world statuses
1 parent 136938b commit 603ca2d

5 files changed

Lines changed: 299 additions & 115 deletions

File tree

src/entity/world/Worlds.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ export default class Worlds {
4848
case 2:
4949
region = Region.Europe
5050
break
51+
case 3:
52+
region = Region.Oceania
53+
break
5154
default:
5255
throw Error('Could not find matching region')
5356
}

src/entity/world/__tests__/Worlds.test.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ describe('Worlds', () => {
4545
})
4646

4747
it('should return an array of servers of expected length', () => {
48-
expect(resultantServers.servers.length).toEqual(68)
48+
expect(resultantServers.servers.length).toEqual(73)
4949
})
5050

5151
it('should return array of data centers of expected length', () => {
52-
expect(resultantServers.dataCenters.length).toEqual(8)
52+
expect(resultantServers.dataCenters.length).toEqual(9)
5353
})
5454

5555
describe('when status is not requested', () => {
@@ -77,9 +77,10 @@ describe('Worlds', () => {
7777
})
7878

7979
describe.each([
80-
['Cerberus', 'Chaos', 'Europe', WorldCategory.Standard, WorldStatus.CreationOfNewCharactersUnavailable],
81-
['Ridill', 'Gaia', 'Japan', WorldCategory.Preferred, WorldStatus.CreationOfNewCharacters],
82-
['Siren', 'Aether', 'North America', WorldCategory.Standard, WorldStatus.CreationOfNewCharacters],
80+
['Cerberus', 'Chaos', 'Europe', WorldCategory.Congested, WorldStatus.CreationOfNewCharactersUnavailable],
81+
['Ridill', 'Gaia', 'Japan', WorldCategory.Standard, WorldStatus.CreationOfNewCharactersUnavailable],
82+
['Ultros', 'Primal', 'North America', WorldCategory.Standard, WorldStatus.CreationOfNewCharacters],
83+
['Bismarck', 'Materia', 'Oceania', WorldCategory.New, WorldStatus.CreationOfNewCharacters],
8384
])('servers array should contain %s', (serverName, dataCenter, region, category, status) => {
8485
let foundServer: World | undefined
8586

0 commit comments

Comments
 (0)