-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
36 lines (26 loc) · 783 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import test from 'ava'
import bilangan from '.'
test('[4000] should output 4 Ribu', t => {
t.is(bilangan(4000), '4 Ribu')
})
test('[31337] should output 31 Ribu', t => {
t.is(bilangan(31337), '31,33 Ribu')
})
test('[170000] should output 170 Ribu', t => {
t.is(bilangan(170000), '170 Ribu')
})
test('[1000000] should output 1 Juta', t => {
t.is(bilangan(1000000), '1 Juta')
})
test('[12000000] should output 12 Juta', t => {
t.is(bilangan(12000000), '12 Juta')
})
test('[3000000000] should output 3 Milyar', t => {
t.is(bilangan(3000000000), '3 Milyar')
})
test('[1250000000] should output 1,25 Milyar', t => {
t.is(bilangan(1250000000), '1,25 Milyar')
})
test('[9000000000000] should output 9 Trilyun', t => {
t.is(bilangan(9000000000000), '9 Trilyun')
})