import { assignPolyfill as assign } from '..';

QUnit.module('Ember.assign');

QUnit.test('Ember.assign', function() {
  let a = { a: 1 };
  let b = { b: 2 };
  let c = { c: 3 };
  let a2 = { a: 4 };

  assign(a, b, c, a2);

  deepEqual(a, { a: 4, b: 2, c: 3 });
  deepEqual(b, { b: 2 });
  deepEqual(c, { c: 3 });
  deepEqual(a2, { a: 4 });
});

@@ -84,28 +84,31 @@
 t.test('
-Ember.assign
+merging objects
 ', funct
@@ -121,17 +121,20 @@
 %7B%0A  let 
-a
+trgt
  = %7B a: 
@@ -144,17 +144,20 @@
 ;%0A  let 
-b
+src1
  = %7B b: 
@@ -167,17 +167,20 @@
 ;%0A  let 
-c
+src2
  = %7B c: 
@@ -188,54 +188,225 @@
  %7D;%0A
+%0A
   
-let a2 = %7B a: 4 %7D;%0A%0A  assign(a, b, c, a2
+assign(trgt, src1, src2);%0A%0A  deepEqual(trgt, %7B a: 1, b: 2, c: 3 %7D, 'assign copies values from one or more source objects to a target object');%0A  deepEqual(src1, %7B b: 2 %7D, 'assign does not change source object 1'
 );%0A
-%0A
   de
@@ -417,83 +417,624 @@
 ual(
-a,
+src2, %7B c: 3 %7D, 'assign does not change source object 2');%0A%7D);%0A%0AQUnit.test('merging objects with same property', function() %7B%0A  let trgt =
  %7B a: 
-4
+1
 , b: 
-2, c: 3 %7D);%0A  deepEqual(b, %7B b: 2 %7D);%0A  deepEqual(c, %7B c: 3
+1 %7D;%0A  let src1 = %7B a: 2, b: 2 %7D;%0A  let src2 = %7B a: 3 %7D;%0A%0A  assign(trgt, src1, src2);%0A  deepEqual(trgt, %7B a: 3, b: 2 %7D, 'properties are overwritten by other objects that have the same properties later in the parameters order');%0A%7D);%0A%0AQUnit.test('null', function() %7B%0A  let trgt = %7B a: 1 %7D;%0A%0A  assign(trgt, null);%0A  deepEqual(trgt, %7B a: 1 %7D, 'null as a source parameter is ignored');%0A%7D);%0A%0AQUnit.test('undefined', function() %7B%0A  let trgt = %7B a: 1
  %7D
+;%0A%0A  assign(trgt, null
 );%0A 
@@ -1048,20 +1048,68 @@
 ual(
-a2
+trgt
 , %7B a: 
-4
+1
  %7D
+, 'undefined as a source parameter is ignored'
 );%0A%7D

Add test coverage to Object.assign polyfill