unexpected
Advanced tools
Comparing version 2.1.3 to 2.1.4
@@ -780,3 +780,3 @@ (function () { | ||
for (var i = 0; i < pattern.length; i += 1) { | ||
var c = pattern[i]; | ||
var c = pattern.charAt(i); | ||
if (c in counts) { | ||
@@ -794,3 +794,3 @@ counts[c] += 1; | ||
if (pattern[i - 1] === '[') { | ||
if (pattern.charAt(i - 1) === '[') { | ||
throw new Error("Assertion patterns must not contain empty flags: '" + pattern + "'"); | ||
@@ -809,3 +809,3 @@ } | ||
if ((c === ')' || c === '|') && counts['('] >= counts[')']) { | ||
if (pattern[i - 1] === '(' || pattern[i - 1] === '|') { | ||
if (pattern.charAt(i - 1) === '(' || pattern.charAt(i - 1) === '|') { | ||
throw new Error("Assertion patterns must not contain empty alternations: '" + pattern + "'"); | ||
@@ -812,0 +812,0 @@ } |
{ | ||
"name": "unexpected", | ||
"version": "2.1.3", | ||
"version": "2.1.4", | ||
"author": "Sune Sloth Simonsen <sune@we-knowhow.dk>", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -254,3 +254,3 @@ (function () { | ||
for (var i = 0; i < pattern.length; i += 1) { | ||
var c = pattern[i]; | ||
var c = pattern.charAt(i); | ||
if (c in counts) { | ||
@@ -268,3 +268,3 @@ counts[c] += 1; | ||
if (pattern[i - 1] === '[') { | ||
if (pattern.charAt(i - 1) === '[') { | ||
throw new Error("Assertion patterns must not contain empty flags: '" + pattern + "'"); | ||
@@ -283,3 +283,3 @@ } | ||
if ((c === ')' || c === '|') && counts['('] >= counts[')']) { | ||
if (pattern[i - 1] === '(' || pattern[i - 1] === '|') { | ||
if (pattern.charAt(i - 1) === '(' || pattern.charAt(i - 1) === '|') { | ||
throw new Error("Assertion patterns must not contain empty alternations: '" + pattern + "'"); | ||
@@ -286,0 +286,0 @@ } |
@@ -782,3 +782,3 @@ /*global describe, it, expect*/ | ||
expect(index, 'to be a number'); | ||
expect(index, 'to be', arr.indexOf(item)); | ||
expect(index, 'to be', parseInt(item, 10)); | ||
}); | ||
@@ -785,0 +785,0 @@ }); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
256944