@eluvio/elv-js-helpers
Version:
A collection of Javascript helper functions used by several Eluvio libraries.
12 lines (10 loc) • 523 B
JavaScript
const TH = require('../../../test-helpers')
const sysTimezone = TH.requireSrcFile('Datetime/sysTimezone')
describe('sysTimezone', () => {
it('should return the system timezone setting', () => {
// unfortunately we have no way to manipulate the environment's timezone, so we are reduced to just
// duplicating the functionality of sysTimezone() itself and making sure it doesn't throw an exception
const opts = new Intl.DateTimeFormat().resolvedOptions()
sysTimezone().should.equal(opts.timeZone)
})
})