aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/error_block/error_block.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/components/error_block/error_block.test.ts')
-rw-r--r--src/lib/components/error_block/error_block.test.ts28
1 files changed, 12 insertions, 16 deletions
diff --git a/src/lib/components/error_block/error_block.test.ts b/src/lib/components/error_block/error_block.test.ts
index d2ac458..401874f 100644
--- a/src/lib/components/error_block/error_block.test.ts
+++ b/src/lib/components/error_block/error_block.test.ts
@@ -10,23 +10,19 @@ import '$lib/i18n';
import ErrorBlock from './error_block.svelte';
describe('Error Block component', () => {
+ test('Should display error message sent', () => {
+ const results = render(ErrorBlock, {
+ props: {
+ message: 'An error has, sadly, destroyed everything.'
+ }
+ });
- test('Should display error message sent', () => {
+ expect(results.getByText('An error has, sadly, destroyed everything.')).toBeVisible();
+ });
- const results = render(ErrorBlock, { props: {
- message: 'An error has, sadly, destroyed everything.'
- } });
+ test('Should display default error message', () => {
+ const results = render(ErrorBlock);
- expect(results.getByText('An error has, sadly, destroyed everything.'))
- .toBeVisible();
- });
-
- test('Should display default error message', () => {
-
- const results = render(ErrorBlock);
-
- expect(results.getByText('Unknown error has occurred. Panic!'))
- .toBeVisible();
- });
+ expect(results.getByText('Unknown error has occurred. Panic!')).toBeVisible();
+ });
});
-