You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
507 B
JavaScript

// Load modules
var Code = require('code');
var Lab = require('lab');
var Utils = require('../lib/utils');
// Declare internals
var internals = {};
// Test shortcuts
var lab = exports.lab = Lab.script();
var expect = Code.expect;
var describe = lab.experiment;
var it = lab.test;
describe('merge()', function () {
it('can merge two objects with the same key', function (done) {
expect(Utils.merge({ a: 'b' }, { a: 'c' })).to.deep.equal({ a: ['b', 'c'] });
done();
});
});