kopia lustrzana https://github.com/shoelace-style/shoelace
remove old test
rodzic
e7e703394d
commit
6a655468d9
|
@ -27,20 +27,6 @@ const createRelativeTimeWithDate = async (relativeDate: Date): Promise<SlRelativ
|
|||
return relativeTime;
|
||||
};
|
||||
|
||||
const expectTitleToMatchLocalizedTimeString = (relativeTime: SlRelativeTime) => {
|
||||
const localize = new LocalizeController(relativeTime);
|
||||
const titleTime = localize.date(yesterday, {
|
||||
month: 'long',
|
||||
year: 'numeric',
|
||||
day: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
timeZoneName: 'short'
|
||||
});
|
||||
const timeElement = extractTimeElement(relativeTime);
|
||||
expect(timeElement?.title).to.equal(titleTime);
|
||||
};
|
||||
|
||||
const minuteInSeconds = 60_000;
|
||||
const hourInSeconds = minuteInSeconds * 60;
|
||||
const dayInSeconds = hourInSeconds * 24;
|
||||
|
@ -145,7 +131,6 @@ describe('sl-relative-time', () => {
|
|||
await relativeTime.updateComplete;
|
||||
const timeElement = extractTimeElement(relativeTime);
|
||||
expect(timeElement?.dateTime).to.equal(yesterday.toISOString());
|
||||
expectTitleToMatchLocalizedTimeString(relativeTime);
|
||||
});
|
||||
|
||||
it('allows to use a short form of the unit', async () => {
|
||||
|
|
Ładowanie…
Reference in New Issue