summary refs log tree commit diff stats
path: root/test/modules
diff options
context:
space:
mode:
authorAlan Pearce2017-06-18 13:36:29 +0200
committerAlan Pearce2017-06-18 13:36:29 +0200
commit69af7f12ec17f0aba65b0e23ef4045ee28f2dac8 (patch)
tree281781690d7bfe4952205e33ec26dff2f442aa57 /test/modules
parent370e7add837f194bebc710c10ccd11bacfc74990 (diff)
downloadhomestead-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.js10
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)
 })