Update unit tests

master
KaKi87 2020-12-25 14:32:41 +01:00
parent 24ff0d5a22
commit b162fd3911
1 changed files with 8 additions and 0 deletions

View File

@ -95,11 +95,19 @@ describe('scraper-instagram', () => {
let client;
before(() => client = new Instagram());
it('gets hashtag', () => expect(client.getHashtag(HASHTAG)).to.be.fulfilled).timeout(5000);
(SESSION_ID ? it : it.skip)('gets hashtag posts', () => {
before(async () => await client.authBySessionId(SESSION_ID));
expect(client.getHashtagPosts(HASHTAG, +GET_COUNT)).to.be.fulfilled;
});
});
describe('Get location', () => {
let client;
before(() => client = new Instagram());
it('gets location by ID', () => expect(client.getLocation(LOCATION_ID)).to.be.fulfilled).timeout(8000);
(SESSION_ID ? it : it.skip)('gets location posts by ID', () => {
before(async () => await client.authBySessionId(SESSION_ID));
expect(client.getLocationPostsById(LOCATION_ID, +GET_COUNT)).to.be.fulfilled;
});
});
(POST ? describe : describe.skip)('Get post', () => {
let client;