Path: blob/master/node_modules/@bochilteam/scraper/lib/cjs/texts/test.js
1126 views
"use strict";1Object.defineProperty(exports, "__esModule", { value: true });2const chai_1 = require("chai");3const index_js_1 = require("./index.js");4describe('Texts', () => {5describe('Aksara Jawa', () => {6it('Latin to Aksara', done => {7try {8const res = (0, index_js_1.latinToAksara)('hallo rek');9(0, chai_1.expect)(res).equal('ꦲꦭ꧀ꦭꦺꦴꦫꦺꦏ꧀');10return done();11}12catch (e) {13return done(e);14}15});16it('Aksara to Latin', done => {17try {18const res = (0, index_js_1.aksaraToLatin)('ꦲꦭ꧀ꦭꦺꦴꦫꦺꦏ꧀', { HVokal: false });19(0, chai_1.expect)(res).equal('hallo rek');20return done();21}22catch (e) {23return done(e);24}25});26});27describe('Bucin', () => {28it('Bucin', done => {29(0, index_js_1.bucin)().then(res => {30(0, chai_1.expect)(res).to.be.a('string');31return done();32}).catch(done);33});34it('Bucin JSON', done => {35const res = index_js_1.bucinjson;36(0, chai_1.expect)(res).to.be.an('array');37(0, chai_1.expect)(res).to.have.lengthOf.at.least(365);38return done();39});40});41describe('Dare', () => {42it('Dare', done => {43(0, index_js_1.dare)().then(res => {44(0, chai_1.expect)(res).to.be.a('string');45return done();46}).catch(done);47});48it('Dare JSON', done => {49const res = index_js_1.darejson;50(0, chai_1.expect)(res).to.be.an('array');51(0, chai_1.expect)(res).to.have.lengthOf.at.least(63);52return done();53});54});55describe('Truth', () => {56it('Truth', done => {57(0, index_js_1.truth)().then(res => {58(0, chai_1.expect)(res).to.be.a('string');59return done();60}).catch(done);61});62it('Truth JSON', done => {63const res = index_js_1.truthjson;64(0, chai_1.expect)(res).to.be.an('array');65(0, chai_1.expect)(res).to.have.lengthOf.at.least(61);66return done();67});68});69describe('TextPro', () => {70it('TextPro', done => {71(0, index_js_1.textpro)('neon', ['Hallo']).then(res => {72(0, chai_1.expect)(res).to.be.a('string');73return done();74}).catch(done);75});76it('TextPro List', done => {77Promise.resolve(index_js_1.textproList).then(res => {78(0, chai_1.expect)(res).to.be.an('array');79(0, chai_1.expect)(res).to.have.lengthOf.at.least(1);80return done();81}).catch(done);82});83});84});85//# sourceMappingURL=test.js.map8687