nvim-treesitter/tests/query/injections/svelte/test-svelte-injections.svelte
lucario387 85d9534491
allow negative assertion in injection tests (#4107)
* tests(vue, svelte): strengthen tests

* fix(html, vue, svelte): fix wrong test format

* allow negative assertions in injection tests
2023-01-07 11:22:20 +01:00

24 lines
697 B
Svelte

<script> import Button from "./Button.svelte"; </script>
<!-- ^ javascript -->
<script lang="ts"> const foo: number = 1
</script>
<!-- ^ typescript -->
<!-- ^ !javascript -->
<style> main { font-family: sans-serif; text-align: center; } </style>
<!-- ^ css -->
<style lang="scss"> main { &:hover { } } </style>
<!-- ^ scss -->
<!-- ^ !css -->
<main>
<h1>Test file</h1>
{#each someItems as someItem}
<!-- ^ javascript
-->
<div>{someItem}</div>
<!-- ^ javascript
-->
{/each}
<Button />
<button on:click={() => foo++}></button>
</main>