Skip to content

Commit

Permalink
fix: missing async/await in tests (#2849)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideMininni-Fincons authored Jun 27, 2024
1 parent 4762279 commit 14dcef4
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe(`sbb-block-link-button`, () => {
for (const state of visualDiffStandardStates) {
it(
state.name,
state.with((setup) => {
setup.withFixture(
state.with(async (setup) => {
await setup.withFixture(
html`<sbb-block-link-button ?negative=${negative}
>Travelcards & tickets</sbb-block-link-button
>`,
Expand All @@ -37,8 +37,8 @@ describe(`sbb-block-link-button`, () => {
describeEach(iconState, ({ iconPlacement, slotted }) => {
it(
visualDiffDefault.name,
visualDiffDefault.with((setup) => {
setup.withFixture(html`
visualDiffDefault.with(async (setup) => {
await setup.withFixture(html`
<sbb-block-link-button
icon-name=${slotted ? nothing : 'chevron-small-right-small'}
icon-placement=${iconPlacement}
Expand All @@ -56,8 +56,8 @@ describe(`sbb-block-link-button`, () => {
for (const size of ['xs', 's', 'm']) {
it(
`size=${size} ${visualDiffDefault.name}`,
visualDiffDefault.with((setup) => {
setup.withFixture(
visualDiffDefault.with(async (setup) => {
await setup.withFixture(
html`<sbb-block-link-button size=${size}>Travelcards & tickets</sbb-block-link-button>`,
);
}),
Expand All @@ -66,8 +66,8 @@ describe(`sbb-block-link-button`, () => {

it(
`width=fixed ${visualDiffDefault.name}`,
visualDiffDefault.with((setup) => {
setup.withFixture(
visualDiffDefault.with(async (setup) => {
await setup.withFixture(
html`<sbb-block-link-button icon-name="chevron-small-right-small" style="width: 200px;">
A lot of link text to show what happens if there is not enough space.
</sbb-block-link-button>`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ describe(`sbb-block-link-static`, () => {
for (const state of [visualDiffDefault, visualDiffActive, visualDiffHover]) {
it(
state.name,
state.with((setup) => {
setup.withFixture(
state.with(async (setup) => {
await setup.withFixture(
html` <sbb-block-link-static ?negative="${negative}"
>Travelcards & tickets</sbb-block-link-static
>`,
Expand All @@ -38,8 +38,8 @@ describe(`sbb-block-link-static`, () => {
describeEach(iconState, ({ iconPlacement, slotted }) => {
it(
visualDiffDefault.name,
visualDiffDefault.with((setup) => {
setup.withFixture(html`
visualDiffDefault.with(async (setup) => {
await setup.withFixture(html`
<sbb-block-link-static
icon-name="${slotted ? nothing : 'chevron-small-right-small'}"
icon-placement="${iconPlacement}"
Expand All @@ -57,8 +57,8 @@ describe(`sbb-block-link-static`, () => {
for (const size of ['xs', 's', 'm']) {
it(
`size=${size} ${visualDiffDefault.name}`,
visualDiffDefault.with((setup) => {
setup.withFixture(
visualDiffDefault.with(async (setup) => {
await setup.withFixture(
html` <sbb-block-link-static size="${size}"
>Travelcards & tickets</sbb-block-link-static
>`,
Expand All @@ -69,8 +69,8 @@ describe(`sbb-block-link-static`, () => {

it(
`width=fixed ${visualDiffDefault.name}`,
visualDiffDefault.with((setup) => {
setup.withFixture(
visualDiffDefault.with(async (setup) => {
await setup.withFixture(
html` <sbb-block-link-static icon-name="chevron-small-right-small" style="width: 200px;">
A lot of link text to show what happens if there is not enough space.
</sbb-block-link-static>`,
Expand Down
16 changes: 8 additions & 8 deletions src/elements/link/block-link/block-link.visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ describe(`sbb-block-link`, () => {
for (const state of visualDiffStandardStates) {
it(
state.name,
state.with((setup) => {
setup.withFixture(
state.with(async (setup) => {
await setup.withFixture(
html`<sbb-block-link href="#" ?negative=${negative}
>Travelcards & tickets</sbb-block-link
>`,
Expand All @@ -37,8 +37,8 @@ describe(`sbb-block-link`, () => {
describeEach(iconState, ({ iconPlacement, slotted }) => {
it(
visualDiffDefault.name,
visualDiffDefault.with((setup) => {
setup.withFixture(html`
visualDiffDefault.with(async (setup) => {
await setup.withFixture(html`
<sbb-block-link
href="#"
icon-name=${slotted ? nothing : 'chevron-small-right-small'}
Expand All @@ -57,8 +57,8 @@ describe(`sbb-block-link`, () => {
for (const size of ['xs', 's', 'm']) {
it(
`size=${size} ${visualDiffDefault.name}`,
visualDiffDefault.with((setup) => {
setup.withFixture(
visualDiffDefault.with(async (setup) => {
await setup.withFixture(
html`<sbb-block-link href="#" size=${size}>Travelcards & tickets</sbb-block-link>`,
);
}),
Expand All @@ -67,8 +67,8 @@ describe(`sbb-block-link`, () => {

it(
`width=fixed ${visualDiffDefault.name}`,
visualDiffDefault.with((setup) => {
setup.withFixture(
visualDiffDefault.with(async (setup) => {
await setup.withFixture(
html`<sbb-block-link href="#" icon-name="chevron-small-right-small" style="width: 200px;">
A lot of link text to show what happens if there is not enough space.
</sbb-block-link>`,
Expand Down
4 changes: 2 additions & 2 deletions src/elements/link/link-button/link-button.visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe(`sbb-link-button`, () => {
for (const state of visualDiffStandardStates) {
it(
`negative=${negative} ${state.name}`,
state.with((setup) => {
setup.withFixture(
state.with(async (setup) => {
await setup.withFixture(
html` <p class="sbb-text-m">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Expand Down
4 changes: 2 additions & 2 deletions src/elements/link/link-static/link-static.visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ describe(`sbb-link-static`, () => {
for (const state of [visualDiffDefault, visualDiffActive, visualDiffHover]) {
it(
`negative=${negative} ${state.name}`,
state.with((setup) => {
setup.withFixture(
state.with(async (setup) => {
await setup.withFixture(
html` <p class="sbb-text-m">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Expand Down
4 changes: 2 additions & 2 deletions src/elements/link/link/link.visual.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe(`sbb-link`, () => {
for (const state of visualDiffStandardStates) {
it(
`negative=${negative} ${state.name}`,
state.with((setup) => {
setup.withFixture(
state.with(async (setup) => {
await setup.withFixture(
html` <p class="sbb-text-m">
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
Expand Down

0 comments on commit 14dcef4

Please sign in to comment.