Skip to content

Commit

Permalink
Rename isEdge helper method in test utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
nmielnik committed Feb 9, 2016
1 parent a89b1e1 commit 461bf4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions spec/anchor.spec.js
@@ -1,5 +1,5 @@
/*global fireEvent, selectElementContents,
selectElementContentsAndFire, isEdge */
selectElementContentsAndFire, getEdgeVersion */

describe('Anchor Button TestCase', function () {
'use strict';
Expand Down Expand Up @@ -580,7 +580,7 @@ describe('Anchor Button TestCase', function () {
// This appears to be broken in Edge < 13, but works correctly in Edge 13 or higher
// So for the sake of sanity, disabling this check for Edge 12.
// TODO: Find a better way to fix this issue if Edge 12 is going to matter
var edgeVersion = isEdge();
var edgeVersion = getEdgeVersion();
if (!edgeVersion || edgeVersion >= 13) {
expect(this.el.innerHTML).toContain('<a href="http://www.google.com"><img src="../demo/img/medium-editor.jpg"></a>');
}
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/util.js
Expand Up @@ -60,7 +60,7 @@ function isIE() {
return ((navigator.appName === 'Microsoft Internet Explorer') || ((navigator.appName === 'Netscape') && (new RegExp('Trident/.*rv:([0-9]{1,}[.0-9]{0,})').exec(navigator.userAgent) !== null)));
}

function isEdge() {
function getEdgeVersion() {
var match = /Edge\/(\d+)/.exec(navigator.userAgent);
if (match !== null) {
return new Number(match[1]);
Expand Down

0 comments on commit 461bf4b

Please sign in to comment.