Skip to content

Commit 9669c44

Browse files
authored
Remove unused code (#4886)
* Remove dead test
1 parent 13a2792 commit 9669c44

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

packages/@internationalized/date/tests/conversion.test.js

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import {BuddhistCalendar, CalendarDate, CalendarDateTime, EthiopicAmeteAlemCalendar, EthiopicCalendar, GregorianCalendar, HebrewCalendar, IndianCalendar, IslamicCivilCalendar, IslamicTabularCalendar, IslamicUmalquraCalendar, JapaneseCalendar, PersianCalendar, TaiwanCalendar, Time, toCalendar, toCalendarDate, toCalendarDateTime, toTime, ZonedDateTime} from '..';
14-
import {fromAbsolute, getTimeZoneOffset, possibleAbsolutes, toAbsolute, toDate} from '../src/conversion';
14+
import {fromAbsolute, possibleAbsolutes, toAbsolute, toDate} from '../src/conversion';
1515

1616
describe('CalendarDate conversion', function () {
1717
describe('toAbsolute', function () {
@@ -138,30 +138,6 @@ describe('CalendarDate conversion', function () {
138138
});
139139
});
140140

141-
describe('setTimeZoneOffset', () => {
142-
it('should support old dates in local timezone with second offsets', () => {
143-
let resolvedOptions = Intl.DateTimeFormat.prototype.resolvedOptions;
144-
const testCases = [
145-
['America/New_York', '1800-01-01T00:00:00Z', -17_762_000],
146-
['Europe/London', '1800-01-01T00:00:00Z', -75_000],
147-
['Europe/Berlin', '1800-01-01T00:00:00Z', 3_208_000],
148-
['Europe/Rome', '1800-01-01T00:00:00Z', 2_996_000]
149-
];
150-
for (let [timezone, date, expectedOffset] of testCases) {
151-
jest.spyOn(Intl.DateTimeFormat.prototype, 'resolvedOptions').mockImplementation(function () {
152-
let s = resolvedOptions.call(this);
153-
s.timeZone = timezone;
154-
return s;
155-
});
156-
157-
const tzOffset = getTimeZoneOffset(new Date(date).getTime(), timezone);
158-
expect(tzOffset).toBe(expectedOffset);
159-
160-
jest.clearAllMocks();
161-
}
162-
});
163-
});
164-
165141
describe('toCalendar', function () {
166142
it('should support converting a CalendarDateTime between calendars', function () {
167143
let date = new CalendarDateTime(new JapaneseCalendar(), 'heisei', 31, 4, 30, 8, 20, 30, 80);

0 commit comments

Comments
 (0)