underscore/drop_test.go
Ruidy c00d9af59f
drop (#18)
* last function

* drop function

* add documentation

* fix CI

Co-authored-by: Ruidy <rnemausat@newstore.com>
2022-03-21 18:04:38 +01:00

17 lines
277 B
Go

package underscore_test
import (
"testing"
"github.com/stretchr/testify/assert"
u "github.com/rjNemo/underscore"
)
func TestDrop(t *testing.T) {
nums := []int{1, 9, 2, 8, 3, 7, 4, 6, 5}
want := []int{1, 9, 2, 3, 7, 4, 6, 5}
assert.Equal(t, want, u.Drop(nums, 3))
}