Last active
April 18, 2017 01:03
-
-
Save pporche87/1a3bd8e82c4271e60b99dc48f512762a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let expect = require ('chai').expect | |
let slice = require ('../src/slice') | |
describe('slice()', () => { | |
it('Creates a slice of array from start up to but now including end', () => { | |
expect(slice(['1', '2', '3', '4', '5'], 1, 3)).to.deep.equal(['2','3']) | |
expect(slice([1, 2, 3, 4, 5], 1, 3)).to.deep.equal([2, 3]) | |
expect(slice([1, '2', [3], 4, 5], 1, 3)).to.deep.equal(['2', [3]]) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment