doctor-general-jest
comment-test

comment-test

combineFiles

Merge two file representations. Can be right or left associative

Usage

import { combineFiles } from 'doctor-general-jest'
 
const a = { a: true, greeting: 'hello', comments: ['one', 'two'], links: ['a', 'b'] }
const b = { b: true, greeting: 'ahoy', comments: ['three', 'four'], links: ['c', 'd'] }
expect(combineFiles(true, a, b)).toEqual({
  a: true,
  b: true,
  greeting: 'ahoy',
  comments: ['one', 'two', 'three', 'four'],
  links: ['a', 'b', 'c', 'd']
})
expect(combineFiles(false, a, b)).toEqual({
  a: true,
  b: true,
  greeting: 'hello',
  comments: ['three', 'four', 'one', 'two'],
  links: ['c', 'd', 'a', 'b']
})

Tools for Monorepos