utils.js 507 B

1234567891011121314151617181920212223242526272829
  1. // Load modules
  2. var Code = require('code');
  3. var Lab = require('lab');
  4. var Utils = require('../lib/utils');
  5. // Declare internals
  6. var internals = {};
  7. // Test shortcuts
  8. var lab = exports.lab = Lab.script();
  9. var expect = Code.expect;
  10. var describe = lab.experiment;
  11. var it = lab.test;
  12. describe('merge()', function () {
  13. it('can merge two objects with the same key', function (done) {
  14. expect(Utils.merge({ a: 'b' }, { a: 'c' })).to.deep.equal({ a: ['b', 'c'] });
  15. done();
  16. });
  17. });