Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { add, complete, cycle, save, suite } from 'benny'
import { method, multi } from '../../src'
import {
createNMethodsWithComplexCaseVal,
createNMethodsWithSimpleFunFun,
createNMethodsWithSimpleValVal,
} from './helpers'
const { version } = require('../../package.json')
export default suite(
'Multimethod execution',
add.skip('Execute identity function for reference', () => {
const fn = (x) => x
return () => fn('foo')
}),
add('Execute multimethod with default method as value only', () => {
const fn = multi(method('default'))
return () => fn('foo')
}),
add(
'Execute multimethod with one simple val/val method - last matching',
() => {
const methods = createNMethodsWithSimpleValVal(1)
const fn = multi(...methods)