moy-fp
Version:
A functional programming library.
30 lines (25 loc) • 484 B
JavaScript
import __ from '../../src/Function/__'
/**
* Number -> Number
*/
import negate from '../../src/Math/negate'
test('negate(not using __), positive number', () => {
expect(
negate(10)
).toBe(-10)
})
test('negate(not using __), negative number', () => {
expect(
negate(-10)
).toBe(10)
})
test('negate(not using __), zero', () => {
expect(
negate(0)
).toBe(0)
})
test('negate(using __), positive number', () => {
expect(
negate(__)(10)
).toBe(-10)
})