From d697d471b5cd0f88b780a1e91c7ded0b9c5343df Mon Sep 17 00:00:00 2001 From: Dan VerWeire Date: Fri, 27 Dec 2019 14:05:23 -0500 Subject: [PATCH] test: add failing test for #69 --- test/test.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/test.js b/test/test.js index 0daf366..26988be 100644 --- a/test/test.js +++ b/test/test.js @@ -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(); +}); \ No newline at end of file