summaryrefslogtreecommitdiff
path: root/test.js
diff options
context:
space:
mode:
Diffstat (limited to 'test.js')
-rw-r--r--test.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..b1a6c13
--- /dev/null
+++ b/test.js
@@ -0,0 +1,21 @@
+const vkflex = require('./index.js')
+
+let nameCases = ['Gen', 'Dat', 'Acc', 'Ins', 'Abl']
+let names = [
+ ['Евгений', 'Зиновьев', 0],
+ ['Павел', 'Дуров', 0],
+ ['Анастасия', 'Семенюк', 1],
+ ['Катя', 'Лебедева', 1]
+]
+
+console.time('flex')
+for (let [name, surname, sex] of names) {
+ console.log('Testing "'+name+' '+surname+'"...')
+
+ for (let nameCase of nameCases) {
+ console.log(nameCase + ': ' + vkflex.name(name, sex, nameCase) + ' ' + vkflex.surname(surname, sex, nameCase))
+ }
+
+ console.log('')
+}
+console.timeEnd('flex')