Skip to content

Commit

Permalink
test: add failing test for #69
Browse files Browse the repository at this point in the history
  • Loading branch information
wankdanker committed Dec 27, 2019
1 parent e3ff650 commit d697d47
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2603,3 +2603,18 @@ test("MAP Should correctly apply transform in array data #68", t => {
t.deepEqual(result, expect);
t.end();
});

test("issue #69: should create an array of values", t => {
var src = [
{ identification: 1235, name: 'John Doe'},
{ identification: 9876, name: 'Brock Doe' }];

var map = { identification: 'id'};

var expect = { id: [ 1235, 9876 ] };

var result = om(src, map);

t.deepEqual(result, expect);
t.end();
});

0 comments on commit d697d47

Please sign in to comment.