{"size": 1031, "ext": "js", "max_stars_repo_path": "test/operatingTimezone/isInOperatingTimezone.test.js", "max_stars_repo_name": "KleeUT/hammertime", "max_stars_repo_stars_event_min_datetime": "2017-04-07T03:46:15.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-09T08:14:30.000Z", "max_issues_repo_path": "test/operatingTimezone/isInOperatingTimezone.test.js", "max_issues_repo_name": "KleeUT/hammertime", "max_issues_repo_issues_event_min_datetime": "2017-04-07T02:29:21.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-06T17:33:43.000Z", "max_forks_repo_path": "test/operatingTimezone/isInOperatingTimezone.test.js", "max_forks_repo_name": "KleeUT/hammertime", "max_forks_repo_forks_event_min_datetime": "2017-04-07T10:25:08.000Z", "max_forks_repo_forks_event_max_datetime": "2019-10-12T01:20:26.000Z"}
{"max_stars_count": 12, "max_issues_count": 36, "max_forks_count": 5, "avg_line_length": 42.9583333333, "max_line_length": 128, "alphanum_fraction": 0.7303588749}
const isInOperatingTimezone = require('../../src/operatingTimezone/isInOperatingTimezone');

describe('isInOperatingTimezone()', () => {
  it('should return true when tags contain a operating timezone the is equal to the current operating timezone', () => {
    const currentOperatingTimezone = 'Australia/Sydney';
    const tags = [{
      Key: 'hammertime:operatingTimezone',
      Value: currentOperatingTimezone,
    }];
    const isInCurrentOperatingTimezone = isInOperatingTimezone(currentOperatingTimezone);
    expect(isInCurrentOperatingTimezone(tags)).to.be.true;
  });

  it('should return false when tags do not contain a operating timezone the is equal to the current operating timezone', () => {
    const currentOperatingTimezone = 'Australia/Sydney';
    const tags = [{
      Key: 'hammertime:operatingTimezone',
      Value: 'Pacific/Auckland',
    }];
    const isInCurrentOperatingTimezone = isInOperatingTimezone(currentOperatingTimezone);
    expect(isInCurrentOperatingTimezone(tags)).to.be.false;
  });
});
