|
@@ -0,0 +1,11 @@
|
|
|
+import split from '../split';
|
|
|
+
|
|
|
+export default test => {
|
|
|
+ test.ok(typeof split === 'function', 'split should be a function');
|
|
|
+ test.ok(Array.isArray(split()), 'should return an array');
|
|
|
+
|
|
|
+ test.ok(split([1, 2, 3, 4], 2).length === 2, 'should split into chunks');
|
|
|
+ test.ok(split([1, 2, 3, 4], 2).every((ar) => ar.length === 2), 'should split into chunks of size 2');
|
|
|
+
|
|
|
+ test.done();
|
|
|
+};
|