synapsecns/sanguine

View on GitHub
packages/coverage-aggregator/bin/scripts.test.js

Summary

Maintainability
A
0 mins
Test Coverage
jest.mock('child_process')
import path from 'path'
import { fork } from 'child_process'

import { execute, COLLECT_FILES } from './aggregate-coverage'
describe('scripts', () => {
  it('should execute the collectFiles', () => {
    execute({
      command: COLLECT_FILES,
      commandArgs: ['mock', 'args'],
    })
    expect(fork).toHaveBeenCalledWith(
      path.resolve(__dirname, '../lib/coverage-aggregator.js'),
      ['mock', 'args']
    )
  })
})