| 256 | return result |
| 257 | } |
| 258 | const exec = cb => |
| 259 | execFunc(`async () => { |
| 260 | await (${typeof cb === 'function' ? cb.toString() : cb})() |
| 261 | return domSnapshots |
| 262 | }`).then(result => { |
| 263 | if (Array.isArray(result)) { |
| 264 | const prettyHtml = require('../../src/fixtures/prettyHtml') |
| 265 | return result.map(prettyHtml) |
| 266 | } |
| 267 | return result |
| 268 | }) |
| 269 | test.context.config = { |
| 270 | ...test.context.config, |
| 271 | globals: { |