feat: add single post endpoint
1 file changed, 9 insertions(+), 1 deletion(-)
changed files
M test/index.test.js → test/index.test.js
@@ -5,7 +5,7 @@ process.env.POST_DIR = path.resolve(__dirname, '../test/data/') const app = require('../src/index.js') -test(t => { +test('homepage', t => { return request(app.listen()) .get('/') .expect(200)@@ -13,3 +13,11 @@ .expect(/hello world/) .expect(/This is a test/) .then(() => t.pass()) }) + +test('post', t => { + return request(app.listen()) + .get('/post/testfile') + .expect(200) + .expect(/Lorem ipsum/) + .then(() => t.pass()) +})