Skip to content
This repository was archived by the owner on Oct 21, 2021. It is now read-only.

Commit b05b543

Browse files
committed
Reformat the test.ts file with prettier
1 parent f57709d commit b05b543

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

test/test.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
import {query, querySelectorAll, closest, getAttribute, namedItem} from "../index";
1+
import {query, querySelectorAll, closest, getAttribute, namedItem} from '../index'
22

3-
const bodyElement1 = query(document, 'body');
4-
const bodyElement2 = query(document, 'body', HTMLBodyElement);
5-
const bodyElement3 = query<HTMLBodyElement>(document, 'body');
6-
const bodyElement4 = query<HTMLBodyElement>(document, 'body', HTMLBodyElement);
3+
const bodyElement1 = query(document, 'body')
4+
const bodyElement2 = query(document, 'body', HTMLBodyElement)
5+
const bodyElement3 = query<HTMLBodyElement>(document, 'body')
6+
const bodyElement4 = query<HTMLBodyElement>(document, 'body', HTMLBodyElement)
77

8-
const formElements1 = querySelectorAll(bodyElement1, '.js-comment-form');
9-
const formElements2 = querySelectorAll(bodyElement2, '.js-comment-form', HTMLFormElement);
10-
const formElements3 = querySelectorAll<HTMLFormElement>(bodyElement3, '.js-comment-form');
11-
const formElements4 = querySelectorAll<HTMLFormElement>(bodyElement4, '.js-comment-form', HTMLFormElement);
8+
const formElements1 = querySelectorAll(bodyElement1, '.js-comment-form')
9+
const formElements2 = querySelectorAll(bodyElement2, '.js-comment-form', HTMLFormElement)
10+
const formElements3 = querySelectorAll<HTMLFormElement>(bodyElement3, '.js-comment-form')
11+
const formElements4 = querySelectorAll<HTMLFormElement>(bodyElement4, '.js-comment-form', HTMLFormElement)
1212

13-
const htmlElement1 = closest(bodyElement1, 'html');
14-
const htmlElement2 = closest(bodyElement2, 'html', HTMLHtmlElement);
15-
const htmlElement3 = closest<HTMLHtmlElement>(bodyElement3, 'html');
16-
const htmlElement4 = closest<HTMLHtmlElement>(bodyElement4, 'html', HTMLHtmlElement);
13+
const htmlElement1 = closest(bodyElement1, 'html')
14+
const htmlElement2 = closest(bodyElement2, 'html', HTMLHtmlElement)
15+
const htmlElement3 = closest<HTMLHtmlElement>(bodyElement3, 'html')
16+
const htmlElement4 = closest<HTMLHtmlElement>(bodyElement4, 'html', HTMLHtmlElement)
1717

18-
const bodyThing = getAttribute(bodyElement1, 'data-things');
18+
const bodyThing = getAttribute(bodyElement1, 'data-things')
1919

20-
const commentForm = formElements3[0];
20+
const commentForm = formElements3[0]
2121

22-
const usernameField = namedItem(commentForm, 'username');
23-
const nameField = namedItem(commentForm, 'name', HTMLInputElement);
24-
const emailField = namedItem<HTMLInputElement>(commentForm, 'email', HTMLInputElement);
25-
const mailinglistsField = namedItem<RadioNodeList>(commentForm, 'mailinglists', RadioNodeList);
26-
const locationField = namedItem<HTMLSelectElement>(commentForm, 'location', HTMLSelectElement);
22+
const usernameField = namedItem(commentForm, 'username')
23+
const nameField = namedItem(commentForm, 'name', HTMLInputElement)
24+
const emailField = namedItem<HTMLInputElement>(commentForm, 'email', HTMLInputElement)
25+
const mailinglistsField = namedItem<RadioNodeList>(commentForm, 'mailinglists', RadioNodeList)
26+
const locationField = namedItem<HTMLSelectElement>(commentForm, 'location', HTMLSelectElement)
2727

2828
// Test that default types are indeed inferred properly
29-
const typedBody1: HTMLElement = bodyElement1;
30-
const typedBody2: HTMLBodyElement = bodyElement2;
31-
const typedFormElements2: Array<HTMLFormElement> = formElements2;
32-
const typedHtmlElement1: HTMLElement = htmlElement1;
33-
const typedHtmlElement2: HTMLHtmlElement = htmlElement2;
34-
const typeUsernameField: HTMLInputElement = usernameField;
35-
const typedNameField: HTMLInputElement = nameField;
29+
const typedBody1: HTMLElement = bodyElement1
30+
const typedBody2: HTMLBodyElement = bodyElement2
31+
const typedFormElements2: Array<HTMLFormElement> = formElements2
32+
const typedHtmlElement1: HTMLElement = htmlElement1
33+
const typedHtmlElement2: HTMLHtmlElement = htmlElement2
34+
const typeUsernameField: HTMLInputElement = usernameField
35+
const typedNameField: HTMLInputElement = nameField

0 commit comments

Comments
 (0)