0
// Returns Testing [Object object]
describe.skip.each([[{foo: 'abc'}], [{foo: 'bca'}]])('Testing %s', ...
// Returns Testing {foo: 'abc'}
describe.skip.each([[{foo: 'abc'}], [{foo: 'bca'}]])('Testing %o', ...

Is it possible do something like...

// Expect Testing abc
describe.skip.each([[{foo: 'abc'}], [{foo: 'bca'}]])('Testing %o.foo', ...
skyboyer
  • 22,209
  • 7
  • 57
  • 64
FabianoLothor
  • 2,752
  • 4
  • 25
  • 39

1 Answers1

2

I think is not possible with that API but with the second API it is

describe.each`
    column
    ${{ foo: 'abc' }}
    ${{ foo: 'bca' }}
    `
    ('Testing $column.foo', ({ column }) => {
        ...
    })

Update

Sadly you cannot build a template literal programmatically, here's how tagged template literals work The ${expresion}is needed to identify the data you want to pass.

Coding Edgar
  • 1,285
  • 1
  • 8
  • 22