We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 559e010 commit da2cee4Copy full SHA for da2cee4
src/syntax-highlight-element.test.js
@@ -1,12 +1,14 @@
1
import { expect, test } from 'vitest';
2
import './index.js';
3
4
-const render = html => document.body.innerHTML = html;
+const render = (html) => {
5
+ document.body.innerHTML = html;
6
+};
7
8
test('default attributes', async () => {
9
render('<syntax-highlight>plain text</syntax-highlight>');
10
+
11
const element = document.querySelector('syntax-highlight');
12
await expect.element(element).toBeInTheDocument();
13
expect(element).toHaveAttribute('tabindex', '0');
14
});
-
0 commit comments