underscore/difference_test.go
Ruidy 6b377350d6
U 21 diff (#23)
* add logo and fix project image description

* add difference function

* update docs

Co-authored-by: Ruidy <rnemausat@newstore.com>
2022-03-24 17:30:01 +01:00

17 lines
298 B
Go

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