Created
May 26, 2021 14:22
-
-
Save sergueyarellano/2b3baab101863b428ee202df3de6cf1d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
test('substituteOperators() should map operator property with the correct method', function ({ deepEqual, end }) { | |
const restrictions = [{ property: 'distance', operator: 'less than', value: '200' }] | |
const restriction = substituteOperators(restrictions)[0] | |
{ | |
const actual = restriction.operator(1, 2) // Start with one assertion | |
const expected = true | |
deepEqual(actual, expected) | |
} | |
{ | |
const actual = restriction.operator(2, 2) // keep making assertions | |
const expected = false | |
deepEqual(actual, expected) | |
} | |
{ | |
const actual = restriction.operator(3, 2) // keep making assertions | |
const expected = false | |
deepEqual(actual, expected) | |
} | |
end() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment