forked from frontend-park-mail-ru/sample-2016
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
20 lines (17 loc) · 969 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let assert = require('assert');
let hello = require('./public/main').hello;
let plural = require('./public/main').plural;
let myplural = require('./public/main').myplural;
assert.equal(hello('Test'), 'Hi, Test');
assert.equal(myplural(0), 'раз');
assert.equal(myplural(1), 'раз');
assert.equal(myplural(2), 'раза');
assert.equal(myplural(13), 'раз');
assert.equal(myplural(22), 'раза');
assert.equal(myplural(100), 'раз');
assert.equal(plural(0), 'Здравствуй, дух');
assert.equal(plural(1), 'Рады приветствовать на нашем курсе!');
assert.equal(plural(2), 'Кликай дальше!! Еще осталось 13 раз(а)');
assert.equal(plural(13), 'Кликай дальше!! Еще осталось 2 раз(а)');
assert.equal(plural(15), '01001000 01101001 00101100 00100000 01100010 01110010 01101111');
assert.equal(plural(100), '01001000 01101001 00101100 00100000 01100010 01110010 01101111');