diff options
Diffstat (limited to 'test/modules')
-rw-r--r-- | test/modules/posts.test.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/modules/posts.test.js b/test/modules/posts.test.js index 28a25f2..cdbf22a 100644 --- a/test/modules/posts.test.js +++ b/test/modules/posts.test.js @@ -24,8 +24,10 @@ test('getFolder', t => { }) ) const actual = posts.getFolder(path.resolve(__dirname, '../data/')) - t.true(Array.isArray(actual), 'must return an array') - t.true(actual.length > 0, 'must return a non-empty array') - t.is(actual[0].path, path.resolve(__dirname, '../data/testfile.md')) - t.deepEqual(actual[0].data, expected) + t.true(actual.size > 0, 'must return a non-empty map') + t.is( + actual.get('testfile').path, + path.resolve(__dirname, '../data/testfile.md') + ) + t.deepEqual(actual.get('testfile').data, expected) }) |