Files
Speedtest-Tracker/conf/site/node_modules/famulus/tests/substr.test.js
Henry Whitaker 7d0681e77b Updated to v1.5.2
2020-06-17 18:33:53 +01:00

19 lines
430 B
JavaScript
Vendored

import test from 'ava';
import substr from './../substr';
test('module should be a function', t => {
t.is(typeof substr, 'function');
});
test('should substring "Hello"', t => {
t.is(substr('Hello World!', 0, 5), 'Hello');
});
test('should substring "World!"', t => {
t.is(substr('Hello World!', 6), 'World!');
});
test('should return value if it is not correct', t => {
t.deepEqual(substr({}, 0, 5), {});
});