effects-as-data icon indicating copy to clipboard operation
effects-as-data copied to clipboard

Handle v2 syntax in test fn

Open kurtcorbett opened this issue 8 years ago • 2 comments

Issue: https://github.com/orourkedd/effects-as-data/issues/25

kurtcorbett avatar Aug 10 '17 04:08 kurtcorbett

I was looking at this PR and wondering if a test wherein the function takes 2 arguments and/or returns a tuple would fail. Would it not recognize this as the new syntax because the first element in the array is a tuple?

test(
  "testFn should accept the V2 syntax",
  testFn(basic, () => {
    // prettier-ignore
    return [
      ['foo', 'bar'],
      [ cmds.echo('foo'), 'foo' ],
      ['foo', 'bar']
    ]
  })
)

orourkedd avatar Aug 18 '17 15:08 orourkedd

Great point. Gonna give it another go.

kurtcorbett avatar Aug 21 '17 17:08 kurtcorbett