diff options
author | Alan Pearce | 2017-06-18 13:36:29 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-18 13:36:29 +0200 |
commit | 69af7f12ec17f0aba65b0e23ef4045ee28f2dac8 (patch) | |
tree | 281781690d7bfe4952205e33ec26dff2f442aa57 /test/modules | |
parent | 370e7add837f194bebc710c10ccd11bacfc74990 (diff) | |
download | homestead-69af7f12ec17f0aba65b0e23ef4045ee28f2dac8.tar.lz homestead-69af7f12ec17f0aba65b0e23ef4045ee28f2dac8.tar.zst homestead-69af7f12ec17f0aba65b0e23ef4045ee28f2dac8.zip |
feat: add single post endpoint
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) }) |