This repository was archived by the owner on Nov 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparsers.spec.js
94 lines (81 loc) · 3.82 KB
/
parsers.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import assert from 'assert';
import { getAlliances, getAlliance } from './parsers/alliancesParser.js';
import { getConquers, getConquer } from './parsers/conquersParser.js';
import { getIslands, getIsland } from './parsers/islandParser.js';
import { getPlayers, getPlayer } from './parsers/playersParser.js';
import {
getPlayersKillsAll, getPlayerKillsAll,
getPlayersKillsAtt, getPlayerKillsAtt,
getPlayersKillsDef, getPlayerKillsDef,
getAlliancesKillsAll, getAllianceKillsAll,
getAlliancesKillsAtt, getAllianceKillsAtt,
getAlliancesKillsDef, getAllianceKillsDef,
} from './parsers/ranksParser.js';
import { getTowns, getTown } from './parsers/townParser.js';
import { ALLY_ID, ALLY_ID_INVALID, CONQUER_ID, CONQUER_ID_INVALID, ISLAND_ID, ISLAND_ID_INVALID, PLAYER_ID, PLAYER_ID_INVALID, TOWN_ID, TOWN_ID_INVALID } from './config.js';
it('AlliancesKillsAll', () => {
assert.notEqual(typeof getAlliancesKillsAll(), 'undefined');
assert.notEqual(typeof getAlliancesKillsAll(), 'undefined');
assert.notEqual(typeof getAllianceKillsAll(ALLY_ID), 'undefined');
assert.equal(typeof getAllianceKillsAll(ALLY_ID_INVALID), 'undefined');
});
it('AlliancesKillsAtt', () => {
assert.notEqual(typeof getAlliancesKillsAtt(), 'undefined');
assert.notEqual(typeof getAlliancesKillsAtt(), 'undefined');
assert.notEqual(typeof getAllianceKillsAtt(ALLY_ID), 'undefined');
assert.equal(typeof getAllianceKillsAtt(ALLY_ID_INVALID), 'undefined');
});
it('AlliancesKillsDef', () => {
assert.notEqual(typeof getAlliancesKillsDef(), 'undefined');
assert.notEqual(typeof getAlliancesKillsDef(), 'undefined');
assert.notEqual(typeof getAllianceKillsDef(ALLY_ID), 'undefined');
assert.equal(typeof getAllianceKillsDef(ALLY_ID_INVALID), 'undefined');
});
it('Alliances', () => {
assert.notEqual(typeof getAlliances(), 'undefined');
assert.notEqual(typeof getAlliances(), 'undefined');
assert.notEqual(typeof getAlliance(ALLY_ID), 'undefined');
assert.equal(typeof getAlliance(ALLY_ID_INVALID), 'undefined');
});
it('Conquers', () => {
assert.notEqual(typeof getConquers(), 'undefined');
assert.notEqual(typeof getConquers(), 'undefined');
assert.notEqual(typeof getConquer(CONQUER_ID), 'undefined');
assert.equal(typeof getConquer(CONQUER_ID_INVALID), 'undefined');
});
it('Islands', () => {
assert.notEqual(typeof getIslands(), 'undefined');
assert.notEqual(typeof getIslands(), 'undefined');
assert.notEqual(typeof getIsland(ISLAND_ID), 'undefined');
assert.equal(typeof getIsland(ISLAND_ID_INVALID), 'undefined');
});
it('Players', () => {
assert.notEqual(typeof getPlayers(), 'undefined');
assert.notEqual(typeof getPlayers(), 'undefined');
assert.notEqual(typeof getPlayer(PLAYER_ID), 'undefined');
assert.equal(typeof getPlayer(PLAYER_ID_INVALID), 'undefined');
});
it('PlayersKillsAll', () => {
assert.notEqual(typeof getPlayersKillsAll(), 'undefined');
assert.notEqual(typeof getPlayersKillsAll(), 'undefined');
assert.notEqual(typeof getPlayerKillsAll(PLAYER_ID), 'undefined');
assert.equal(typeof getPlayerKillsAll(PLAYER_ID_INVALID), 'undefined');
});
it('PlayersKillsAtt', () => {
assert.notEqual(typeof getPlayersKillsAtt(), 'undefined');
assert.notEqual(typeof getPlayersKillsAtt(), 'undefined');
assert.notEqual(typeof getPlayerKillsAtt(PLAYER_ID), 'undefined');
assert.equal(typeof getPlayerKillsAtt(PLAYER_ID_INVALID), 'undefined');
});
it('PlayersKillsDef', () => {
assert.notEqual(typeof getPlayersKillsDef(), 'undefined');
assert.notEqual(typeof getPlayersKillsDef(), 'undefined');
assert.notEqual(typeof getPlayerKillsDef(PLAYER_ID), 'undefined');
assert.equal(typeof getPlayerKillsDef(PLAYER_ID_INVALID), 'undefined');
});
it('Towns', () => {
assert.notEqual(typeof getTowns(), 'undefined');
assert.notEqual(typeof getTowns(), 'undefined');
assert.notEqual(typeof getTown(TOWN_ID), 'undefined');
assert.equal(typeof getTown(TOWN_ID_INVALID), 'undefined');
});