Skip to content

Commit

Permalink
style: format
Browse files Browse the repository at this point in the history
  • Loading branch information
Lodin committed Oct 4, 2024
1 parent b1f31ba commit d43da1b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
13 changes: 7 additions & 6 deletions test/router/lifecycle-events.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import '../setup.js';
import type { MaybePromise } from '../../src/resolver/types.js';
import type {
Commands,
Route,
RouteContext,
VaadinRouterErrorEvent,
VaadinRouterLocationChangedEvent,
Expand Down Expand Up @@ -398,7 +399,7 @@ describe('Vaadin Router lifecycle events', () => {
]);

await router.render('/');
const homeViewElement = outlet.children[0];
const [homeViewElement] = outlet.children;

await router.render('/users');

Expand Down Expand Up @@ -598,7 +599,7 @@ describe('Vaadin Router lifecycle events', () => {
]);

await router.render('/');
const homeViewElement = outlet.children[0];
const [homeViewElement] = outlet.children;

await router.render('/users');

Expand Down Expand Up @@ -1695,7 +1696,7 @@ describe('Vaadin Router lifecycle events', () => {
'x-spy.connectedCallback',
'x-spy.onAfterEnter',
]);
const view = outlet.children[0];
const [view] = outlet.children;

callbacksLog = [];
await router.render('/a');
Expand Down Expand Up @@ -1724,7 +1725,7 @@ describe('Vaadin Router lifecycle events', () => {
},
},
],
},
} satisfies Route,
],
true,
);
Expand Down Expand Up @@ -1802,7 +1803,7 @@ describe('Vaadin Router lifecycle events', () => {

// Pathname only means empty search string
await router.render('/a');
const view = outlet.children[0];
const [view] = outlet.children;

callbacksLog = [];

Expand All @@ -1825,7 +1826,7 @@ describe('Vaadin Router lifecycle events', () => {

// Pathname only means empty search string
await router.render('/a');
const view = outlet.children[0];
const [view] = outlet.children;

callbacksLog = [];
await router.render({ pathname: '/a', search: '?foo=bar' });
Expand Down
3 changes: 1 addition & 2 deletions test/router/router.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { expect } from '@esm-bundle/chai';
import sinon from 'sinon';
import type { EmptyObject } from 'type-fest';
import { Router } from '../../src/router.js';
import type {
ChildrenCallback,
Expand Down Expand Up @@ -2153,7 +2152,7 @@ describe('Router', () => {
});

it('should throw if the return result is not an object or array', async () => {
const children: ChildrenCallback<EmptyObject, EmptyObject> = async () =>
const children: ChildrenCallback = async () =>
await new Promise((resolve) => {
// @ts-expect-error: Testing invalid return value
resolve(null);
Expand Down
2 changes: 1 addition & 1 deletion test/triggers/popstate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('NavigationTriggers.POPSTATE', () => {
expect(POPSTATE).to.have.property('inactivate').that.is.a('function');
});

it('should translate `popstate` events into `vaadin-router-go` when activated', async () => {
it('should translate `popstate` events into `vaadin-router-go` when activated', () => {
POPSTATE.inactivate();
const spy = sinon.spy();
window.addEventListener('vaadin-router-go', spy);
Expand Down

0 comments on commit d43da1b

Please sign in to comment.