diff --git a/lib/jasmine-core/jasmine.js b/lib/jasmine-core/jasmine.js index a077925a..f74f8ed7 100644 --- a/lib/jasmine-core/jasmine.js +++ b/lib/jasmine-core/jasmine.js @@ -1042,7 +1042,7 @@ getJasmineRequireObj().Spec = function(j$) { boilerplateEnd = boilerplateStart + Spec.pendingSpecExceptionMessage.length; - return fullMessage.substr(boilerplateEnd); + return fullMessage.slice(boilerplateEnd); }; Spec.pendingSpecExceptionMessage = '=> marked Pending'; diff --git a/spec/core/asymmetric_equality/ArrayContainingSpec.js b/spec/core/asymmetric_equality/ArrayContainingSpec.js index 71d44df3..8024b5bd 100644 --- a/spec/core/asymmetric_equality/ArrayContainingSpec.js +++ b/spec/core/asymmetric_equality/ArrayContainingSpec.js @@ -58,8 +58,8 @@ describe('ArrayContaining', function() { if ( typeof a == 'string' && typeof b == 'string' && - a.substr(0, 3) == 'foo' && - b.substr(0, 3) == 'foo' + a.slice(0, 3) == 'foo' && + b.slice(0, 3) == 'foo' ) { return true; } diff --git a/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js b/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js index c25470ae..c6e111a0 100644 --- a/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js +++ b/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js @@ -48,8 +48,8 @@ describe('ArrayWithExactContents', function() { if ( typeof a == 'string' && typeof b == 'string' && - a.substr(0, 3) == 'foo' && - b.substr(0, 3) == 'foo' + a.slice(0, 3) == 'foo' && + b.slice(0, 3) == 'foo' ) { return true; } diff --git a/spec/core/asymmetric_equality/ObjectContainingSpec.js b/spec/core/asymmetric_equality/ObjectContainingSpec.js index 07772047..9b567892 100644 --- a/spec/core/asymmetric_equality/ObjectContainingSpec.js +++ b/spec/core/asymmetric_equality/ObjectContainingSpec.js @@ -121,8 +121,8 @@ describe('ObjectContaining', function() { if ( typeof a == 'string' && typeof b == 'string' && - a.substr(0, 3) == 'foo' && - b.substr(0, 3) == 'foo' + a.slice(0, 3) == 'foo' && + b.slice(0, 3) == 'foo' ) { return true; } diff --git a/spec/core/integration/CustomMatchersSpec.js b/spec/core/integration/CustomMatchersSpec.js index 5bd990f8..643451ef 100644 --- a/spec/core/integration/CustomMatchersSpec.js +++ b/spec/core/integration/CustomMatchersSpec.js @@ -81,8 +81,8 @@ describe('Custom Matchers (Integration)', function() { if ( typeof a == 'string' && typeof b == 'string' && - a.substr(0, 3) == 'foo' && - b.substr(0, 3) == 'foo' + a.slice(0, 3) == 'foo' && + b.slice(0, 3) == 'foo' ) { return true; } diff --git a/src/core/Spec.js b/src/core/Spec.js index f9a774a8..f4bc6b54 100644 --- a/src/core/Spec.js +++ b/src/core/Spec.js @@ -316,7 +316,7 @@ getJasmineRequireObj().Spec = function(j$) { boilerplateEnd = boilerplateStart + Spec.pendingSpecExceptionMessage.length; - return fullMessage.substr(boilerplateEnd); + return fullMessage.slice(boilerplateEnd); }; Spec.pendingSpecExceptionMessage = '=> marked Pending';