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/religions/test.js
1126 views
1
import { expect } from 'chai';
2
import { asmaulhusna, asmaulhusnajson, alquran, jadwalsholat, listJadwalSholat } from './index.js';
3
describe('Religions', () => {
4
describe('Asmaul Husna', () => {
5
it('AsmaulHusna', done => {
6
asmaulhusna().then(res => {
7
expect(res).to.be.an('object');
8
expect(res.index).to.be.a('number');
9
expect(res.latin).to.be.a('string');
10
expect(res.arabic).to.be.a('string');
11
expect(res.translation_id).to.be.a('string');
12
expect(res.translation_en).to.be.a('string');
13
return done();
14
}).catch(done);
15
});
16
it('AsmaulHusna JSON', done => {
17
const res = asmaulhusnajson;
18
expect(res).to.be.an('array');
19
expect(res).to.have.length(99);
20
return done();
21
});
22
});
23
describe('Al quran', () => {
24
it('Alquran', done => {
25
alquran().then(res => {
26
expect(res).to.have.length(114);
27
return done();
28
}).catch(done);
29
});
30
});
31
describe('Jadwal Sholat', () => {
32
it('jadwalSholat', done => {
33
jadwalsholat('Semarang').then(res => {
34
expect(res).to.be.an('object');
35
expect(res.today).to.be.an('object');
36
expect(res.list).to.be.an('array');
37
expect(res.list).to.have.lengthOf.at.least(27);
38
return done();
39
}).catch(done);
40
});
41
it('List jadwal sholat', done => {
42
Promise.resolve(listJadwalSholat).then(res => {
43
expect(res).to.be.an('array');
44
expect(res).to.have.lengthOf.at.least(316);
45
return done();
46
}).catch(done);
47
});
48
});
49
});
50
//# sourceMappingURL=test.js.map
51