Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
test(html pipe): Add test for graceful handling of missing 404.md
Browse files Browse the repository at this point in the history
Add unit test to verify graceful handling of missing 404.md error page

fix #227
  • Loading branch information
ramboz committed May 10, 2019
1 parent 8665822 commit 4c6533f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/testFetchMarkdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,23 @@ describe('Test non-existing content', () => {
const result = await fetch({}, myaction);
assert.ok(result.content.body);
});

it('Getting missing 404.md', async () => {
const myaction = {
request: {
params: {
repo: 'xdm', ref: '', path: '404.md', owner: 'adobe',
},
},
logger,
};

await coerce(myaction);

const result = await fetch({}, myaction);
assert.ok(result.error);
assert.equal(result.response.body, undefined);
});
});

describe('Test requests', () => {
Expand Down

0 comments on commit 4c6533f

Please sign in to comment.