diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-19 12:12:15 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-19 12:12:15 +0200 |
| commit | 362cf45bc520a68a1c1be20e1189ca2307577dde (patch) | |
| tree | d9a300e065001b9c95670cda8225fd55706d52a5 /src/components/molecules/layout/code.test.tsx | |
| parent | a4a406463d69f6901919d273e831dff22a838caf (diff) | |
chore: add a Code component
Diffstat (limited to 'src/components/molecules/layout/code.test.tsx')
| -rw-r--r-- | src/components/molecules/layout/code.test.tsx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/components/molecules/layout/code.test.tsx b/src/components/molecules/layout/code.test.tsx new file mode 100644 index 0000000..ebcfae5 --- /dev/null +++ b/src/components/molecules/layout/code.test.tsx @@ -0,0 +1,16 @@ +import { render } from '@test-utils'; +import Code from './code'; + +const code = ` +function foo() { + return 'bar'; +} +`; + +const language = 'javascript'; + +describe('Code', () => { + it('renders a code block', () => { + render(<Code language={language}>{code}</Code>); + }); +}); |
