{"size": 802, "ext": "js", "max_stars_repo_path": "test/lib.test.js", "max_stars_repo_name": "jacobsun/sga", "max_stars_repo_stars_event_min_datetime": "2017-12-04T10:11:19.000Z", "max_stars_repo_stars_event_max_datetime": "2017-12-10T06:51:49.000Z", "max_issues_repo_path": "test/lib.test.js", "max_issues_repo_name": "jacobsun/sga", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "test/lib.test.js", "max_forks_repo_name": "jacobsun/sga", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 4, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.4347826087, "max_line_length": 84, "alphanum_fraction": 0.3428927681}
const expect = require('chai').expect
const {mergeObject} = require('../lib.js')

describe('lib.js', () => {
  describe('mergePackageJson', () => {
    const local = {
      a: {
        aa: 'aa'
      },
      b: 'b',
      c: {
        c: 'c',
        e: 'e'
      }
    }

    it('should merge other to local (different type keys should not touch)', () => {
      const other = {
        a: 'a',
        aa: {
          aaa: 'aaaa'
        },
        c: {
          c: 'c',
          d: 'd'
        }
      }
      const result = {
        a: {
          aa: 'aa'
        },
        aa: {
          aaa: 'aaaa'
        },
        b: 'b',
        c: {
          c: 'c',
          d: 'd',
          e: 'e'
        }
      }
      expect(mergeObject(local, other)).to.deep.equal(result)
    })
  })
})
