From 7e745673269c4f8b54cb5b23e1a79776b6acdf3b Mon Sep 17 00:00:00 2001 From: Rob Cameron Date: Mon, 26 Oct 2020 16:52:15 -0700 Subject: [PATCH] Updates tests to 0.21.0 style assertions --- .../components/BlogPostCell/BlogPostCell.test.js | 16 +++++++++------- .../BlogPostsCell/BlogPostsCell.test.js | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/web/src/components/BlogPostCell/BlogPostCell.test.js b/web/src/components/BlogPostCell/BlogPostCell.test.js index fb74f1b..b0c8030 100644 --- a/web/src/components/BlogPostCell/BlogPostCell.test.js +++ b/web/src/components/BlogPostCell/BlogPostCell.test.js @@ -4,19 +4,21 @@ import { standard } from './BlogPostCell.mock' describe('BlogPostCell', () => { test('Loading renders successfully', () => { - render() - // Use screen.debug() to see output - expect(screen.getByText('Loading...')).toBeInTheDocument() + expect(() => { + render() + }).not.toThrow() }) test('Empty renders successfully', async () => { - render() - expect(screen.getByText('Empty')).toBeInTheDocument() + expect(() => { + render() + }).not.toThrow() }) test('Failure renders successfully', async () => { - render() - expect(screen.getByText(/Oh no/i)).toBeInTheDocument() + expect(() => { + render() + }).not.toThrow() }) test('Success renders successfully', async () => { diff --git a/web/src/components/BlogPostsCell/BlogPostsCell.test.js b/web/src/components/BlogPostsCell/BlogPostsCell.test.js index 94337f8..1411048 100644 --- a/web/src/components/BlogPostsCell/BlogPostsCell.test.js +++ b/web/src/components/BlogPostsCell/BlogPostsCell.test.js @@ -4,19 +4,21 @@ import { standard } from './BlogPostsCell.mock' describe('BlogPostsCell', () => { test('Loading renders successfully', () => { - render() - // Use screen.debug() to see output - expect(screen.getByText('Loading...')).toBeInTheDocument() + expect(() => { + render() + }).not.toThrow() }) test('Empty renders successfully', async () => { - render() - expect(screen.getByText('Empty')).toBeInTheDocument() + expect(() => { + render() + }).not.toThrow() }) test('Failure renders successfully', async () => { - render() - expect(screen.getByText(/Oh no/i)).toBeInTheDocument() + expect(() => { + render() + }).not.toThrow() }) test('Success renders successfully', async () => {