| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 7 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 1 | Features | 0 | 
| 1 | import test from 'ava'; | ||
| 4 | test('getAPIPrefix', t => { | ||
| 5 |     t.is(getAPIPrefix('api'), '/api', 'relative path'); | ||
| 6 |     t.is(getAPIPrefix('/api'), '/api', 'absolute path'); | ||
| 7 |     t.is(getAPIPrefix('http://api.example.com'), 'http://api.example.com', 'http url'); | ||
| 8 |     t.is(getAPIPrefix('https://api.example.com'), 'https://api.example.com', 'http url'); | ||
| 9 |     t.is(getAPIPrefix('//api.example.com'), '//api.example.com', 'protocol-less url'); | ||
| 10 | }); |