all repos — archive/homestead @ 69af7f12ec17f0aba65b0e23ef4045ee28f2dac8

My future indieweb platform

feat: add single post endpoint

Alan Pearce
commit

69af7f12ec17f0aba65b0e23ef4045ee28f2dac8

parent

370e7add837f194bebc710c10ccd11bacfc74990

1 file changed, 9 insertions(+), 1 deletion(-)

changed files
M test/index.test.jstest/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()) +})