-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtests.community.spec.ts
More file actions
40 lines (33 loc) · 1.23 KB
/
tests.community.spec.ts
File metadata and controls
40 lines (33 loc) · 1.23 KB
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
import { Test } from '@nestjs/testing';
import { TestsCommunity } from '../src/tests.community';
import { osintConfig } from '@app/configuration';
import { HttpModule } from '@nestjs/axios';
import { raidCharacter } from '../mocks';
describe.skip('COMMUNITY', () => {
let testsService: TestsCommunity;
jest.setTimeout(600_000);
beforeAll(async () => {
const [app] = await Promise.all([
Test.createTestingModule({
imports: [HttpModule],
controllers: [],
providers: [TestsCommunity],
}).compile(),
]);
testsService = app.get<TestsCommunity>(TestsCommunity);
});
describe('WCL-PAGE-LOGS', () => {
it('page response', async () => {
const response = await testsService.getLogsFromPage(osintConfig, 417, 1);
expect(Array.isArray(response)).toBeTruthy();
response.map((logId) => expect(logId).toEqual(expect.any(String)));
});
});
describe('WCL-CHARACTER-RAID-LOGS', () => {
it('logs response', async () => {
const raidCharacters = await testsService.getCharactersFromLogs('', '7M98VAxrmyKvZhqd');
expect(Array.isArray(raidCharacters)).toBeTruthy();
raidCharacters.map((character) => expect(character).toMatchObject(raidCharacter));
});
});
});