forked from paulroub/tddmash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspanish.test.js
68 lines (53 loc) · 1.46 KB
/
spanish.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const {
GetClockwork
} = require('./clockwork');
const testClock = GetClockwork('es');
test('noon', () => {
const time = '12:00';
const expected = [
"son", "las", "doce"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});
test('one is prefixed with "la"', () => {
const time = '1:00';
const expected = [
"es", "la", "una"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});
test('1:10 es la una y diez', () => {
const time = '1:10';
const expected = [
"es", "la", "una", "y", "diez"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});
test('12:45 es la una menos quarto', () => {
const time = '12:45';
const expected = [
"es", "la", "una", "menos", "cuarto"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});
test('half past the hour', () => {
const time = '12:30';
const expected = [
"son", "las", "doce", "y", "media"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});
test('twenty-five past the hour', () => {
const time = '12:25';
const expected = [
"son", "las", "doce", "y", "veinticinco"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});
test('ten to 12', () => {
const time = '11:52';
const expected = [
"son", "las", "doce", "menos", "diez"
];
expect(testClock.timeWords(time)).toStrictEqual(expected);
});