update conditional tests
This commit is contained in:
parent
0dbba4d847
commit
51b64da106
|
|
@ -164,9 +164,7 @@ describe('collections', () => {
|
||||||
await expect(`empty? meow`).toEvaluateTo(false, globalFunctions)
|
await expect(`empty? meow`).toEvaluateTo(false, globalFunctions)
|
||||||
})
|
})
|
||||||
|
|
||||||
// TODO: These tests fail due to parser/compiler issues with == operator in function bodies
|
test('list.filter keeps matching elements', async () => {
|
||||||
// The functions themselves work correctly when passed native JS functions
|
|
||||||
test.skip('list.filter keeps matching elements', async () => {
|
|
||||||
await expect(`
|
await expect(`
|
||||||
is-positive = do x:
|
is-positive = do x:
|
||||||
x == 3 or x == 4 or x == 5
|
x == 3 or x == 4 or x == 5
|
||||||
|
|
@ -184,7 +182,7 @@ describe('collections', () => {
|
||||||
`).toEvaluateTo(10, globalFunctions)
|
`).toEvaluateTo(10, globalFunctions)
|
||||||
})
|
})
|
||||||
|
|
||||||
test.skip('list.find returns first match', async () => {
|
test('list.find returns first match', async () => {
|
||||||
await expect(`
|
await expect(`
|
||||||
is-four = do x:
|
is-four = do x:
|
||||||
x == 4
|
x == 4
|
||||||
|
|
@ -193,11 +191,9 @@ describe('collections', () => {
|
||||||
`).toEvaluateTo(4, globalFunctions)
|
`).toEvaluateTo(4, globalFunctions)
|
||||||
})
|
})
|
||||||
|
|
||||||
test.skip('list.find returns null if no match', async () => {
|
test('list.find returns null if no match', async () => {
|
||||||
await expect(`
|
await expect(`
|
||||||
is-ten = do x:
|
is-ten = do x: x == 10 end
|
||||||
x == 10
|
|
||||||
end
|
|
||||||
list.find [1 2 3] is-ten
|
list.find [1 2 3] is-ten
|
||||||
`).toEvaluateTo(null, globalFunctions)
|
`).toEvaluateTo(null, globalFunctions)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user