{"size": 669, "ext": "js", "max_stars_repo_path": "src/__tests__/isIE.js", "max_stars_repo_name": "richardscarrott/bugz", "max_stars_repo_stars_event_min_datetime": "2017-01-29T21:48:10.000Z", "max_stars_repo_stars_event_max_datetime": "2021-12-19T13:13:49.000Z", "max_issues_repo_path": "src/__tests__/isIE.js", "max_issues_repo_name": "richardscarrott/bugz", "max_issues_repo_issues_event_min_datetime": "2017-01-30T21:54:03.000Z", "max_issues_repo_issues_event_max_datetime": "2019-02-12T22:03:50.000Z", "max_forks_repo_path": "src/__tests__/isIE.js", "max_forks_repo_name": "richardscarrott/bugz", "max_forks_repo_forks_event_min_datetime": "2017-04-17T18:55:08.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-20T03:31:47.000Z"}
{"max_stars_count": 17, "max_issues_count": 12, "max_forks_count": 3, "avg_line_length": 30.4090909091, "max_line_length": 70, "alphanum_fraction": 0.7294469357}
import isIE from '../isIE';
import {
  WINDOWS_7_IE_10_0_TRIDENT_6_0,
  WINDOWS_XP_IE_6_0,
  MAC_OS_10_5_FIREFOX_3_0_3_GECKO_1_9_0_3,
  WINDOWS_PHONE_OS_7_0_IEMOBILE_7_0_TRIDENT_3_1_DELL_MOBILE
} from '../../test/fixtures/userAgentStrings';

describe('isIE', () => {
  it('returns true if the browser is IE', () => {
    expect(isIE(WINDOWS_7_IE_10_0_TRIDENT_6_0)).toBe(true);
    expect(isIE(WINDOWS_XP_IE_6_0)).toBe(true);
  });

  it('returns false if the browser is not IE', () => {
    expect(isIE(MAC_OS_10_5_FIREFOX_3_0_3_GECKO_1_9_0_3)).toBe(false);
    expect(
      isIE(WINDOWS_PHONE_OS_7_0_IEMOBILE_7_0_TRIDENT_3_1_DELL_MOBILE)
    ).toBe(false);
  });
});
