aboutsummaryrefslogtreecommitdiff
path: root/src/lib/components/actions
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/actions
parenta7cf03c192470cbab13edeb1aec99e0c66dede10 (diff)
Apply formatting
Diffstat (limited to 'src/lib/components/actions')
-rw-r--r--src/lib/components/actions/topic.svelte8
-rw-r--r--src/lib/components/actions/topic.test.ts28
2 files changed, 17 insertions, 19 deletions
diff --git a/src/lib/components/actions/topic.svelte b/src/lib/components/actions/topic.svelte
index 1311d06..a3cba3b 100644
--- a/src/lib/components/actions/topic.svelte
+++ b/src/lib/components/actions/topic.svelte
@@ -1,14 +1,14 @@
<script lang="ts">
- import type { TopicAction } from '$lib/stores/action';
+ import type { TopicAction } from '$lib/stores/action';
export let actions: TopicAction;
import { _ } from 'svelte-i18n';
</script>
<li>
- <a href="/reply/{actions.id}" title={$_('header.action.reply.title')}>
- {@html $_('header.action.reply.display')}
- </a>
+ <a href="/reply/{actions.id}" title={$_('header.action.reply.title')}>
+ {@html $_('header.action.reply.display')}
+ </a>
</li>
<style>
diff --git a/src/lib/components/actions/topic.test.ts b/src/lib/components/actions/topic.test.ts
index 0037a7f..9a17d38 100644
--- a/src/lib/components/actions/topic.test.ts
+++ b/src/lib/components/actions/topic.test.ts
@@ -9,21 +9,19 @@ import '$lib/i18n';
import Topic from './topic.svelte';
-const internals = {
- results: null
-};
-
describe('Topic Actions component', () => {
+ test('Should link to reply page', () => {
+ const results = render(Topic, {
+ props: {
+ actions: {
+ id: '8ebaa211-fd9b-423a-8b4f-b57622007fde'
+ }
+ }
+ });
- test('Should link to reply page', () => {
-
- const results = render(Topic, { props: {
- actions: {
- id: '8ebaa211-fd9b-423a-8b4f-b57622007fde'
- }
- } });
-
- expect(results.getByTitle('Reply').closest('a'))
- .toHaveAttribute('href', '/reply/8ebaa211-fd9b-423a-8b4f-b57622007fde');
- });
+ expect(results.getByTitle('Reply').closest('a')).toHaveAttribute(
+ 'href',
+ '/reply/8ebaa211-fd9b-423a-8b4f-b57622007fde'
+ );
+ });
});