Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should throw an error without specified timezone', () => {
// $ExpectError
timezones.getCountriesForTimezone();
});
});
it('should return an array of countries for specified timezone', () => {
const timezone = timezones.getCountriesForTimezone('Europe/Berlin');
// $ExpectError
(timezones.getCountriesForTimezone('Europe/Berlin'): void);
});
it('should return an array of timezones for specified country', () => {
const timezone = timezones.getTimezonesForCountry('ES');
// $ExpectError
(timezones.getTimezonesForCountry('ES'): number);
});
it('should throw an error without specified country', () => {
// $ExpectError
timezones.getTimezonesForCountry();
});
});
it('should return an object of countries', () => {
const allCountries = timezones.getAllCountries();
// $ExpectError
(timezones.getAllCountries(): string);
});
});
it('should return an object of timezones', () => {
const allTimezones = timezones.getAllTimezones();
// $ExpectError
(timezones.getAllTimezones(): string);
});
});