From 7eeabeb1fcebda95c793da67f771cf309ba2827a Mon Sep 17 00:00:00 2001 From: Jon Ursenbach Date: Fri, 18 Jun 2021 16:44:07 -0700 Subject: [PATCH] test: fixing a broken test on node 14 --- test/cmds/docs.test.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/cmds/docs.test.js b/test/cmds/docs.test.js index 00409c90f..758864694 100644 --- a/test/cmds/docs.test.js +++ b/test/cmds/docs.test.js @@ -230,8 +230,9 @@ describe('rdme docs:edit', () => { it('should error if doc fails validation', () => { expect.assertions(2); const slug = 'getting-started'; + const body = 'abcdef'; - const getMock = nock(config.host).get(`/api/v1/docs/${slug}`).reply(200, {}); + const getMock = nock(config.host).get(`/api/v1/docs/${slug}`).reply(200, { body }); const putMock = nock(config.host).put(`/api/v1/docs/${slug}`).reply(400, { error: 'DOC_INVALID', @@ -256,7 +257,9 @@ describe('rdme docs:edit', () => { it('should handle error if $EDITOR fails', () => { expect.assertions(1); const slug = 'getting-started'; - nock(config.host).get(`/api/v1/docs/${slug}`).reply(200, {}); + const body = 'abcdef'; + + nock(config.host).get(`/api/v1/docs/${slug}`).reply(200, { body }); function mockEditor(filename, cb) { return cb(1);