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