pull/706/head
Cory LaViska 2022-03-16 17:52:30 -04:00
rodzic ad0ac34f9d
commit 4f99bbace9
1 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -56,7 +56,7 @@ describe('<sl-format-date>', () => {
<sl-format-date .date="${new Date(new Date().getFullYear(), 0, 1)}" lang="${setup.lang}"></sl-format-date>
`
);
expect(el.shadowRoot?.textContent).to.equal(setup.result);
expect(el.shadowRoot?.textContent?.trim()).to.equal(setup.result);
});
});
});
@ -77,7 +77,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { weekday: weekdayFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -95,7 +95,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { era: eraFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -113,7 +113,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { year: yearFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -131,7 +131,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { month: monthFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -149,7 +149,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { day: dayFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -167,7 +167,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { hour: hourFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -188,7 +188,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { minute: minuteFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -209,7 +209,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { second: secondFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -230,7 +230,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { timeZoneName: timeZoneNameFormat }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -251,7 +251,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', { timeZone: timeZone }).format(
new Date(new Date().getFullYear(), 0, 1)
);
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});
@ -272,7 +272,7 @@ describe('<sl-format-date>', () => {
const expected = new Intl.DateTimeFormat('en-US', {
hour12: hourFormatValue === 'auto' ? undefined : hourFormatValue === '12'
}).format(new Date(new Date().getFullYear(), 0, 1));
expect(el.shadowRoot?.textContent).to.equal(expected);
expect(el.shadowRoot?.textContent?.trim()).to.equal(expected);
});
});
});