Total Complexity | 3 |
Complexity/F | 1 |
Lines of Code | 23 |
Function Count | 3 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import { assert } from 'chai'; |
||
2 | import { dumpCommand, resolveUrl } from 'utils'; |
||
3 | import factory from '../Test'; |
||
4 | |||
5 | suite('Utils'); |
||
6 | |||
7 | before(async function () { |
||
8 | await factory.cleanup(); |
||
9 | }); |
||
10 | |||
11 | test('parse telegram commands', async function () { |
||
12 | assert.deepOwnInclude(dumpCommand('/url "my cool template"'), { |
||
13 | command : 'url', |
||
14 | template : 'my cool template' |
||
15 | }); |
||
16 | }); |
||
17 | |||
18 | test('resolve url', function () { |
||
19 | assert.equal( |
||
20 | resolveUrl(null, 'http://google.com').href, |
||
21 | 'http://google.com/' |
||
22 | ); |
||
23 | }); |
||
24 |