-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtests.js
38 lines (29 loc) · 1.25 KB
/
tests.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
const NathanTinyAnalyzer = require('./analyzer')
const options = {
myName: '_nathanTiny2',
searchFor: 'nathanTiny1',
replyWith: 'nathanTiny2'
}
const analyzer = new NathanTinyAnalyzer(options)
function test(obj, repeat = false) {
const msg = analyzer.calculateResponse(obj.nick, obj.data, obj.features, repeat)
if (!msg) {
console.log('------------')
console.log(`${obj.nick}: ${obj.data}`)
console.log('Cannot respond!')
console.log('------------')
return
}
console.log('------------')
console.log(`${obj.nick}: ${obj.data}`)
console.log('Respond as ' + options.myName + ': "' + msg + '"')
console.log('------------')
}
test({ nick: 'Nick', data: 'nathanTiny1_nathanTiny1nathanTiny1 REAL ONE -> nathanTiny1 nathanTiny1' })
test({ nick: '_nathanTiny2', data: 'nathanTiny1' })
test({ nick: 'dggL', data: 'some text nathanTiny1 dggL' })
test({ nick: 'Destiny', data: 'FUCK OFF THIS IS A LONG TEXT nathanTiny1' })
test({ nick: 'tng69', data: 'you\'re DUMB lmao, you cannot get THIS one nathanTiny1' })
test({ nick: 'SOY_SPAMMER_LMAO', data: 'SOY I spam nathanTiny2 SOY nathanTiny1' })
test({ nick: 'Repeater', data: 'Nothing special just talking' })
test({ nick: 'Repeater', data: 'BOOM out of nowhere you get nathanTiny1' }, true)