Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@bochilteam/scraper/lib/esm/images/test.js
1126 views
1
import { expect } from 'chai';
2
import { googleImage, pinterest, wallpaper, wallpaperv2, stickerLine, stickerTelegram } from './index.js';
3
describe('Images', () => {
4
it('google-image', done => {
5
googleImage('Minecraft').then(res => {
6
expect(res).to.be.an('array');
7
res.forEach(v => expect(v).to.be.a('string'));
8
return done();
9
}).catch(done);
10
});
11
it('pinterest', done => {
12
pinterest('Minecraft').then(res => {
13
expect(res).to.be.an('array');
14
res.forEach(v => expect(v).to.be.a('string'));
15
return done();
16
}).catch(done);
17
});
18
describe('Wallpaper', () => {
19
it('wallpaper', done => {
20
wallpaper('Minecraft').then(res => {
21
expect(res).to.be.an('array');
22
res.forEach(v => expect(v).to.be.a('string'));
23
return done();
24
}).catch(done);
25
});
26
it('wallpaper V2', done => {
27
wallpaperv2('Wallpaper Anime').then(res => {
28
expect(res).to.be.an('array');
29
res.forEach(v => expect(v).to.be.a('string'));
30
return done();
31
}).catch(done);
32
});
33
// it ('Wallpaper V3', done => {
34
// wallpaperv3('Wallpaper HD').then(res => {
35
// expect(res).to.be.an('array')
36
// res.forEach(v => expect(v).to.be.a('string'))
37
// return done()
38
// }).catch(done)
39
// })
40
});
41
it('Sticker Telegram', done => {
42
stickerTelegram('Minecraft').then(res => {
43
expect(res).to.be.an('array');
44
res.forEach(v => expect(v).to.be.an('object'));
45
return done();
46
}).catch(done);
47
});
48
it('Sticker Line', done => {
49
stickerLine('Anime').then(res => {
50
expect(res).to.be.an('array');
51
res.forEach(v => expect(v).to.be.an('object'));
52
return done();
53
}).catch(done);
54
});
55
});
56
//# sourceMappingURL=test.js.map
57