From 338106601a4d26ee1f78540d43195e1fa30b5001 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 29 Jul 2024 18:09:01 +0100 Subject: [PATCH] Update tests --- tests/helpers/__snapshots__/outputHelper.test.ts.snap | 4 +++- tests/helpers/outputHelper.test.ts | 3 +++ tests/index.test.ts | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/helpers/__snapshots__/outputHelper.test.ts.snap b/tests/helpers/__snapshots__/outputHelper.test.ts.snap index 79f386f..39e952e 100644 --- a/tests/helpers/__snapshots__/outputHelper.test.ts.snap +++ b/tests/helpers/__snapshots__/outputHelper.test.ts.snap @@ -2,6 +2,7 @@ exports[`GenerateOutput EXPECT standout output to be returned 1`] = ` "Archived = false +Author = author Downvotes = 0 Hidden = false Permalink = /r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/ @@ -12,10 +13,11 @@ Upvotes = 17 Url = https://preview.redd.it/d5yno653zf7d1.jpg?width=640&crop=smart&auto=webp&s=5064d1caec3c12ac2855eb57ff131d0b313d5e9d" `; -exports[`GenerateOutput GIVEN options.json is true, EXPECT output to be returned as JSON 1`] = `"{"Archived":false,"Downs":0,"Hidden":false,"Permalink":"/r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/","Subreddit":"Rabbits","SubredditSubscribers":654751,"Title":"This is my Ms Bear!","Ups":17,"Url":"https://preview.redd.it/d5yno653zf7d1.jpg?width=640&crop=smart&auto=webp&s=5064d1caec3c12ac2855eb57ff131d0b313d5e9d"}"`; +exports[`GenerateOutput GIVEN options.json is true, EXPECT output to be returned as JSON 1`] = `"{"Archived":false,"Author":"author","Downs":0,"Hidden":false,"Permalink":"/r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/","Subreddit":"Rabbits","SubredditSubscribers":654751,"Title":"This is my Ms Bear!","Ups":17,"Url":"https://preview.redd.it/d5yno653zf7d1.jpg?width=640&crop=smart&auto=webp&s=5064d1caec3c12ac2855eb57ff131d0b313d5e9d"}"`; exports[`GenerateOutput GIVEN options.queryMetadata is supplied, EXPECT query metadata to be added 1`] = ` "Archived = false +Author = author Downvotes = 0 Hidden = false Permalink = /r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/ diff --git a/tests/helpers/outputHelper.test.ts b/tests/helpers/outputHelper.test.ts index a0f1959..5e90dc8 100644 --- a/tests/helpers/outputHelper.test.ts +++ b/tests/helpers/outputHelper.test.ts @@ -14,6 +14,7 @@ describe("GenerateOutput", () => { }, Result: { Archived: false, + Author: 'author', Downs: 0, Hidden: false, Permalink: "/r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/", @@ -45,6 +46,7 @@ describe("GenerateOutput", () => { }, Result: { Archived: false, + Author: 'author', Downs: 0, Hidden: false, Permalink: "/r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/", @@ -78,6 +80,7 @@ describe("GenerateOutput", () => { }, Result: { Archived: false, + Author: 'author', Downs: 0, Hidden: false, Permalink: "/r/Rabbits/comments/1dj8pbt/this_is_my_ms_bear/", diff --git a/tests/index.test.ts b/tests/index.test.ts index f70d411..8e49ffd 100644 --- a/tests/index.test.ts +++ b/tests/index.test.ts @@ -20,6 +20,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -52,6 +53,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -137,6 +139,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -173,6 +176,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -209,6 +213,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -244,6 +249,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -276,6 +282,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/', @@ -311,6 +318,7 @@ describe('randomBunny', () => { { data: { archived: false, + author: 'author', downs: 0, hidden: false, permalink: '/r/Rabbits/comments/12pa5te/someone_told_pickles_its_monday_internal_fury/',