🎉 setup tests and add some

This commit is contained in:
Kevin Van Der Werff
2019-10-22 13:21:46 +02:00
parent bf7c412dfe
commit 4bb5fde140
6 changed files with 2874 additions and 171 deletions

29
test/pure.test.js Normal file
View File

@@ -0,0 +1,29 @@
import * as P from '../utils/pure.js'
test('includesElOf 1', () => {
expect(P.includesElOf([1, 2])([2])).toBeTruthy
})
test('includesElOf 2', () => {
expect(P.includesElOf([1, 2])([3])).toBeFalsy
})
test('includesElOf 3', () => {
expect(P.includesElOf(['a', 'b'])(['a'])).toBeTruthy
})
test('includesElOf 4', () => {
expect(P.includesElOf(['aa', 'b'])(['a'])).toBeFalsy
})
test('partiallyIncludesElOf 1', () => {
expect(P.partiallyIncludesElOf(['a', 'b'], ['a'])).toBeTruthy
})
test('partiallyIncludesElOf 2', () => {
expect(P.partiallyIncludesElOf(['aa', 'b'], ['a'])).toBeTruthy
})
test('partiallyIncludesElOf 3', () => {
expect(P.partiallyIncludesElOf(['aa', 'b'], ['c'])).toBeFalsy
})