aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/error_block/error_block.test.ts
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 01:02:58 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 01:02:58 +0200
commitcac85db02ff00732cf75d473dc3411332f33d845 (patch)
tree5f244968a905eb3888434b3f60cbf05d2b652207 /src/lib/components/error_block/error_block.test.ts
parenta7cf03c192470cbab13edeb1aec99e0c66dede10 (diff)
Apply formatting
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();
+ });
});
-