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