(file, commandArguments, options, parentOptions)
| 19 | }; |
| 20 | |
| 21 | export const nestedInstance = (file, commandArguments, options, parentOptions) => { |
| 22 | [commandArguments, options = {}, parentOptions = {}] = Array.isArray(commandArguments) |
| 23 | ? [commandArguments, options, parentOptions] |
| 24 | : [[], commandArguments, options]; |
| 25 | const { |
| 26 | parentFixture = 'nested.js', |
| 27 | worker = false, |
| 28 | isSync = false, |
| 29 | optionsFixture, |
| 30 | optionsInput = {}, |
| 31 | ...otherOptions |
| 32 | } = options; |
| 33 | const normalizedArguments = { |
| 34 | parentFixture, |
| 35 | parentOptions, |
| 36 | isSync, |
| 37 | file, |
| 38 | commandArguments, |
| 39 | options: otherOptions, |
| 40 | optionsFixture, |
| 41 | optionsInput, |
| 42 | }; |
| 43 | return worker |
| 44 | ? spawnWorker(normalizedArguments) |
| 45 | : spawnParentProcess(normalizedArguments); |
| 46 | }; |
| 47 | |
| 48 | const spawnWorker = async workerData => { |
| 49 | const worker = new Worker(WORKER_URL, {workerData}); |
no test coverage detected
searching dependent graphs…