Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar committed Jun 19, 2024
1 parent 04bd67a commit 086aa63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/card/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ describe('macro: card', () => {
it('outputs an `img` element with the expected `srcset`', () => {
const $ = cheerio.load(renderComponent('card', EXAMPLE_CARD_WITH_PLACEHOLDER_IMAGE));

expect($('.ons-card__image').attr('srcset')).toBe('/img/small/placeholder-card.png 1x, /img/large/placeholder-card.png 2x');
expect($('.ons-card__image').attr('srcset')).toBe('/img/small/placeholder-card.png 1x,/img/large/placeholder-card.png 2x');
});

it('outputs an `img` element with the expected `src`', () => {
Expand All @@ -217,7 +217,7 @@ describe('macro: card', () => {
const $ = cheerio.load(renderComponent('card', EXAMPLE_CARD_WITH_PLACEHOLDER_IMAGE_WITH_PATH));

expect($('.ons-card__image').attr('srcset')).toBe(
'/placeholder-image-url/img/small/placeholder-card.png 1x, /placeholder-image-url/img/large/placeholder-card.png 2x',
'/placeholder-image-url/img/small/placeholder-card.png 1x,/placeholder-image-url/img/large/placeholder-card.png 2x',
);
});

Expand Down
4 changes: 2 additions & 2 deletions src/components/question/_macro.njk
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% macro onsQuestion(params) %}

{%- set titleHtml -%}
{%- if params.readDescriptionFirst == true and params.description -%}
{% if params.readDescriptionFirst == true and params.description %}
<div class="ons-question__description ons-u-vh">{{- params.description | safe -}}</div>
{%- endif -%}{{- params.title | safe -}}
{% endif %}{{- params.title | safe -}}
{%- endset -%}

{%- set descHtml -%}
Expand Down

0 comments on commit 086aa63

Please sign in to comment.