mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
test(code-snippet): add unit tests
This commit is contained in:
parent
936a681194
commit
b15bf65f88
11 changed files with 232 additions and 21 deletions
17
tests/CodeSnippet/CodeSnippetCustomEvents.test.svelte
Normal file
17
tests/CodeSnippet/CodeSnippetCustomEvents.test.svelte
Normal file
|
@ -0,0 +1,17 @@
|
|||
<script lang="ts">
|
||||
import { CodeSnippet } from "carbon-components-svelte";
|
||||
|
||||
let copyCount = 0;
|
||||
|
||||
function handleCopy() {
|
||||
copyCount += 1;
|
||||
}
|
||||
</script>
|
||||
|
||||
Copy events: {copyCount}
|
||||
|
||||
<CodeSnippet
|
||||
type="single"
|
||||
code="npm install --save @carbon/icons"
|
||||
on:copy={handleCopy}
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue