Jasmine
1.3.1 revision 1354556913
Show
passed
skipped
run all
0 specs, 0 failures in 0.029s
Finished at Sun Mar 16 2025 10:56:13 GMT+0000 (Coordinated Universal Time)
run
Array
run
#forEach()
run
strings
run
should iterate all in a string
run
should iterate all in a string using a context
run
should pass the right parameters
run
should not affect elements added to the array after it has begun
run
should set the right context when given none
run
should iterate all
run
should iterate all using a context
run
should iterate all in an array-like object
run
should iterate all in an array-like object using a context
run
should have a boxed object as list argument of callback
run
does not autobox the content in strict mode
run
#some()
run
should pass the correct values along to the callback
run
should not affect elements added to the array after it has begun
run
should set the right context when given none
run
should return false if it runs to the end
run
should return true if it is stopped somewhere
run
should return false if there are no elements
run
should stop after 3 elements
run
should stop after 3 elements using a context
run
should stop after 3 elements in an array-like object
run
should stop after 3 elements in an array-like object using a context
run
should have a boxed object as list argument of callback
run
#every()
run
should pass the correct values along to the callback
run
should not affect elements added to the array after it has begun
run
should set the right context when given none
run
should return true if the array is empty
run
should return true if it runs to the end
run
should return false if it is stopped before the end
run
should return after 3 elements
run
should stop after 3 elements using a context
run
should stop after 3 elements in an array-like object
run
should stop after 3 elements in an array-like object using a context
run
should have a boxed object as list argument of callback
run
#indexOf()
run
Array-like
run
should find the element (array-like)
run
should not find the element (array-like)
run
should find undefined as well (array-like)
run
should skip unset indexes (array-like)
run
should use a strict test (array-like)
run
should skip the first if fromIndex is set (array-like)
run
should work with negative fromIndex (array-like)
run
should work with fromIndex being greater than the length (array-like)
run
should work with fromIndex being negative and greater than the length (array-like)
run
should find the element
run
should not find the element
run
should find undefined as well
run
should skip unset indexes
run
should use a strict test
run
should skip the first if fromIndex is set
run
should work with negative fromIndex
run
should work with fromIndex being greater than the length
run
should work with fromIndex being negative and greater than the length
run
#lastIndexOf()
run
Array
run
should find the element
run
should not find the element
run
should find undefined as well
run
should skip unset indexes
run
should use a strict test
run
should skip the first if fromIndex is set
run
should work with negative fromIndex
run
should work with fromIndex being greater than the length
run
should work with fromIndex being negative and greater than the length
run
Array like
run
should find the element (array-like)
run
should not find the element (array-like)
run
should find undefined as well (array-like)
run
should skip unset indexes (array-like)
run
should use a strict test (array-like)
run
should skip the first if fromIndex is set
run
should work with negative fromIndex
run
should work with fromIndex being greater than the length
run
should work with fromIndex being negative and greater than the length
run
#filter()
run
Array object
run
should call the callback with the proper arguments
run
should not affect elements added to the array after it has begun
run
should skip unset values
run
should pass the right context to the filter
run
should set the right context when given none
run
should remove only the values for which the callback returns false
run
should leave the original array untouched
run
should not be affected by same-index mutation
run
Array like
run
should call the predicate with the proper arguments
run
should not affect elements added to the array after it has begun
run
should skip non-set values
run
should set the right context when given none
run
should pass the right context to the filter
run
should remove only the values for which the callback returns false
run
should leave the original array untouched
run
should have a boxed object as list argument of callback
run
#map()
run
Array object
run
should call mapper with the right parameters
run
should set the context correctly
run
should set the right context when given none
run
should not change the array it is called on
run
should only run for the number of objects in the array when it started
run
should properly translate the values as according to the callback
run
should skip non-existing values
run
Array-like
run
should call mapper with the right parameters
run
should set the context correctly
run
should set the right context when given none
run
should not change the array it is called on
run
should only run for the number of objects in the array when it started
run
should properly translate the values as according to the callback
run
should skip non-existing values
run
should have a boxed object as list argument of callback
run
#reduce()
run
Array
run
should pass the correct arguments to the callback
run
should start with the right initialValue
run
should not affect elements added to the array after it has begun
run
should work as expected for empty arrays
run
should throw correctly if no callback is given
run
should return the expected result
run
should not directly affect the passed array
run
should skip non-set values
run
should have the right length
run
Array-like objects
run
should pass the correct arguments to the callback
run
should start with the right initialValue
run
should not affect elements added to the array after it has begun
run
should work as expected for empty arrays
run
should throw correctly if no callback is given
run
should return the expected result
run
should not directly affect the passed array
run
should skip non-set values
run
should have the right length
run
should have a boxed object as list argument of callback
run
#reduceRight()
run
Array
run
should pass the correct arguments to the callback
run
should start with the right initialValue
run
should not affect elements added to the array after it has begun
run
should work as expected for empty arrays
run
should work as expected for empty arrays with an initial value
run
should throw correctly if no callback is given
run
should return the expected result
run
should not directly affect the passed array
run
should skip non-set values
run
should have the right length
run
Array-like objects
run
should pass the correct arguments to the callback
run
should start with the right initialValue
run
should not affect elements added to the array after it has begun
run
should work as expected for empty arrays
run
should throw correctly if no callback is given
run
should return the expected result
run
should not directly affect the passed array
run
should skip non-set values
run
should have the right length
run
should have a boxed object as list argument of callback
run
.isArray()
run
should be true for Array
run
should be false for primitives
run
should fail for other objects
run
should be false for an HTML element
run
#shift()
run
works on arrays
run
is generic
run
#unshift()
run
should return length
run
works on arrays
run
is generic
run
#splice()
run
has the right length
run
defaults deleteCount to length - start if there is only 1 argument
run
basic implementation test 1
run
basic implementation test 2
run
should return right result 1
run
should return right result 2
run
should return right result 3
run
should do nothing if method called with no arguments
run
should set first argument to 0 if first argument is set but undefined
run
should work with objects - adding 1
run
should work with objects - adding 2
run
should work with objects - removing
run
should work with objects - replacing
run
should not break on sparse arrays in Opera
run
should not break on sparse arrays in Safari 7/8
run
#join()
run
defaults to a comma separator when none is provided
run
defaults to a comma separator when undefined is provided
run
works, extended
run
is generic
run
works with a string literal
run
works with `arguments`
run
#push()
run
works on arrays
run
is generic
run
#pop()
run
works on arrays
run
is generic
run
#slice()
run
works on arrays
run
is generic
run
works with `arguments`
run
boxed string access
run
should be able to slice a NodeList
run
#sort()
run
usage
run
requires a function or undefined as first argument
run
requires a non-function or non-undefined to throw a `TypeError`
run
ascending
run
[5,2,4,6,1,3] should result in [1,2,3,4,5,6]
run
[5,2,2,6,1,3] should result in [1,2,2,3,5,6]
run
[0,0,0,0,0,1] should result in [0,0,0,0,0,1]
run
[0,0,0,0,0,-1] should result in [-1,0,0,0,0,0]
run
[f,e,d,a,c,b] should result in [a,b,c,d,e,f]
run
[f,e,d,,,,a,c,b] should result in [a,b,c,d,e,f,,,]
run
[f,e,d,,null,,a,c,b] should result in [a,b,c,d,e,f,null,,,]
run
[f,e,d,,null,undefined,a,c,b] should result in [a,b,c,d,e,f,null,undefined,,]
run
[] should result in []
run
[1] should result in [1]
run
result should find only greater or equal values
run
descending
run
[5,2,4,6,1,3] should result in [6,5,4,3,2,1]
run
[5,2,2,6,1,3] should result in [6,5,4,2,2,1]
run
[0,0,0,0,0,1] should result in [1,0,0,0,0,0]
run
[0,0,0,0,0,-1] should result in [0,0,0,0,0,-1]
run
[f,e,d,a,c,b] should result in [f,e,d,c,b,a]
run
[f,e,d,,,a,c,b] should result in [f,e,d,c,b,a,,,]
run
[f,e,d,,null,,a,c,b] should result in [null,f,e,d,c,b,a,,,]
run
[f,e,d,undefined,null,,a,c,b] should result in [null,f,e,d,c,b,a,undefined,,]
run
[] should result in []
run
[1] should result in [1]
run
result should find only lesser or equal values
run
returned value
run
should be the source object
run
when used generically
run
should not sort objects without length
run
should sort objects ascending with length
run
should sort objects descending with length
run
should sort objects descending with mixed content types and with length
run
should sort `arguments` object ascending
run
should sort `arguments` object ascending with mixed content types
run
should sort `arguments` object descending
run
should sort `arguments` object descending with mixed content types
run
Date
run
.now()
run
should be the current time
run
constructor
run
works with standard formats
run
is not enumerable
run
works as a function
run
fixes this Safari 8/9 bug
run
works with a Date object
run
.parse()
run
is not enumerable
run
should be an invalid date
run
should work
run
fixes a Safari 8/9 bug with parsing in UTC instead of local time
run
should support extended years
run
works with timezone offsets
run
should be able to coerce to a number
run
#toString()
run
should show correct date info for undefined
run
#valueOf()
run
should give a numeric value
run
should not be NaN
run
should give an int value
run
#getUTCDate()
run
should return the right value for negative dates
run
#getUTCDay()
run
should return the right value for negative dates
run
#getUTCFullYear()
run
should return the right value for negative dates
run
#getUTCMonth()
run
should return the right value for negative dates
run
should return correct values
run
#getUTCHours()
run
should return the right value for negative dates
run
#getUTCMinutes()
run
should return the right value for negative dates
run
#getUTCSeconds()
run
should return the right value for negative dates
run
#getUTCMilliseconds()
run
should return the right value for negative dates
run
#getDate()
run
should return the right value for negative dates
run
#getDay()
run
should return the right value for negative dates
run
#getFullYear()
run
should return the right value for negative dates
run
#getMonth()
run
should return the right value for negative dates
run
#getHours()
run
should return the right value for negative dates
run
#getMinutes()
run
should return the right value for negative dates
run
#getSeconds()
run
should return the right value for negative dates
run
#getMilliseconds()
run
should return the right value for negative dates
run
#toISOString()
run
should support extended years
run
should return correct dates
run
#toUTCString()
run
should return correct dates
run
#toDateString()
run
should return correct dates
run
#toString()
run
should return correct dates
run
#toJSON()
run
should call toISOString
run
should return null for not finite dates
run
should return the isoString when stringified
run
Error
run
#toString()
run
stringifies a newed error properly
run
stringifies a thrown error properly
run
enumerability of prototype properties
run
#message
run
#name
run
Function
run
#apply()
run
works with arraylike objects
run
#bind()
run
binds properly without a context
run
binds properly without a context, and still supplies bound arguments
run
binds a context properly
run
binds a context and supplies bound arguments
run
returns properly without binding a context
run
returns properly without binding a context, and still supplies bound arguments
run
returns properly while binding a context properly
run
returns properly while binding a context and supplies bound arguments
run
has the new instance's context as a constructor
run
passes the correct arguments as a constructor
run
returns the return value of the bound function when called as a constructor
run
returns the correct value if constructor returns primitive
run
returns the value that instance of original "class" when called as a constructor
run
sets a correct length without thisArg
run
sets a correct length with thisArg
run
sets a correct length with thisArg and first argument
run
sets a correct length without thisArg and first argument
run
sets a correct length without thisArg and too many argument
run
global methods
run
parseInt
run
has the right name
run
accepts a radix
run
defaults the radix to 10 when the number does not start with 0x or 0X
run
defaults the radix to 16 when the number starts with 0x or 0X
run
ignores leading whitespace
run
defaults the radix properly when not a true number
run
allows sign-prefixed hex values
run
NaN parsing
run
throws on symbols
run
parseFloat()
run
works with zeroes
run
NaN parsing
run
Number
run
#toFixed()
run
should convert numbers correctly
run
#toPrecision()
run
throws a RangeError when < 1 or > 21 (or > 100 in ES2018+)
run
works as expected
run
works with an undefined precision
run
constants
run
should have MAX_VALUE
run
should have MIN_VALUE
run
should have NaN
run
should have POSITIVE_INFINITY
run
should have NEGATIVE_INFINITY
run
Object
run
.keys()
run
arguments objects
run
works with an arguments object
run
works with a legacy arguments object
run
enumerating over non-enumerable properties
run
has no enumerable keys on a Function
run
has no enumerable keys on a boolean
run
has no enumerable keys on an object
run
should have correct length
run
should return an Array
run
should return names which are own properties
run
should return names which are enumerable
run
works with boxed primitives
run
works with boxed primitives with extra properties
run
can serialize all objects on the `window`
run
.isExtensible()
run
should return true if object is extensible
run
should return false if object is not extensible
run
should return false if object is sealed
run
should return false if object is frozen
run
should throw error for non object
run
.defineProperty()
run
should return the initial value
run
should be setable
run
should return the parent initial value
run
should not override the parent value
run
should throw error for non object
run
should not throw error for empty descriptor
run
.getOwnPropertyDescriptor()
run
should return undefined because the object does not own the property
run
should return a data descriptor
run
should return undefined because the object does not own the property
run
should return a data descriptor
run
should throw error for non object
run
.getPrototypeOf()
run
should return the [[Prototype]] of an object
run
should shamone to the `Object.prototype` if `object.constructor` is not a function
run
should throw error for non object
run
should return null on Object.create(null)
run
.defineProperties()
run
should define the constructor property
run
.create()
run
should create objects with no properties when called as `Object.create(null)`
run
String
run
#trim()
run
trims all ES5 whitespace
run
does not trim the zero-width space
run
#replace()
run
returns undefined for non-capturing groups
run
should not fail in Firefox
run
#split()
run
Tests from Steven Levithan
run
''.split() results in ['']
run
''.split(/./) results in ['']
run
''.split(/.?/) results in []
run
''.split(/.??/) results in []
run
'ab'.split(/a*/) results in ['', 'b']
run
'ab'.split(/a*?/) results in ['a', 'b']
run
'ab'.split(/(?:ab)/) results in ['', '']
run
'ab'.split(/(?:ab)*/) results in ['', '']
run
'ab'.split(/(?:ab)*?/) results in ['a', 'b']
run
'test'.split('') results in ['t', 'e', 's', 't']
run
'test'.split() results in ['test']
run
'111'.split(1) results in ['', '', '', '']
run
'test'.split(/(?:)/, 2) results in ['t', 'e']
run
'test'.split(/(?:)/, -1) results in ['t', 'e', 's', 't']
run
'test'.split(/(?:)/, undefined) results in ['t', 'e', 's', 't']
run
'test'.split(/(?:)/, null) results in []
run
'test'.split(/(?:)/, NaN) results in []
run
'test'.split(/(?:)/, true) results in ['t']
run
'test'.split(/(?:)/, '2') results in ['t', 'e']
run
'test'.split(/(?:)/, 'two') results in []
run
'a'.split(/-/) results in ['a']
run
'a'.split(/-?/) results in ['a']
run
'a'.split(/-??/) results in ['a']
run
'a'.split(/a/) results in ['', '']
run
'a'.split(/a?/) results in ['', '']
run
'a'.split(/a??/) results in ['a']
run
'ab'.split(/-/) results in ['ab']
run
'ab'.split(/-?/) results in ['a', 'b']
run
'ab'.split(/-??/) results in ['a', 'b']
run
'a-b'.split(/-/) results in ['a', 'b']
run
'a-b'.split(/-?/) results in ['a', 'b']
run
'a-b'.split(/-??/) results in ['a', '-', 'b']
run
'a--b'.split(/-/) results in ['a', '', 'b']
run
'a--b'.split(/-?/) results in ['a', '', 'b']
run
'a--b'.split(/-??/) results in ['a', '-', '-', 'b']
run
''.split(/()()/) results in []
run
'.'.split(/()()/) results in ['.']
run
'.'.split(/(.?)(.?)/) results in ['', '.', '', '']
run
'.'.split(/(.??)(.??)/) results in ['.']
run
'.'.split(/(.)?(.)?/) results in ['', '.', undefined, '']
run
'A<B>bold</B>and<CODE>coded</CODE>'.split(/<(\/)?([^<>]+)>/) results in ['A', undefined, 'B', 'bold', '/', 'B', 'and', undefined, 'CODE', 'coded', '/', 'CODE', '']
run
'tesst'.split(/(s)*/) results in ['t', undefined, 'e', 's', 't']
run
'tesst'.split(/(s)*?/) results in ['t', undefined, 'e', undefined, 's', undefined, 's', undefined, 't']
run
'tesst'.split(/(s*)/) results in ['t', '', 'e', 'ss', 't']
run
'tesst'.split(/(s*?)/) results in ['t', '', 'e', '', 's', '', 's', '', 't']
run
'tesst'.split(/(?:s)*/) results in ['t', 'e', 't']
run
'tesst'.split(/(?=s+)/) results in ['te', 's', 'st']
run
'test'.split('t') results in ['', 'es', '']
run
'test'.split('es') results in ['t', 't']
run
'test'.split(/t/) results in ['', 'es', '']
run
'test'.split(/es/) results in ['t', 't']
run
'test'.split(/(t)/) results in ['', 't', 'es', 't', '']
run
'test'.split(/(es)/) results in ['t', 'es', 't']
run
'test'.split(/(t)(e)(s)(t)/) results in ['', 't', 'e', 's', 't', '']
run
'.'.split(/(((.((.??)))))/) results in ['', '.', '.', '.', '', '', '']
run
'.'.split(/(((((.??)))))/) results in ['.']
run
'a b c d'.split(/ /, -(Math.pow(2, 32) - 1)) results in ['a']
run
'a b c d'.split(/ /, Math.pow(2, 32) + 1) results in ['a']
run
'a b c d'.split(/ /, Infinity) results in []
run
If "separator" is undefined must return Array with one String - "this" string
run
If "separator" is undefined and "limit" set to 0 must return Array[]
run
works with the second argument
run
#indexOf()
run
has basic support
run
works with unicode
run
#lastIndexOf()
run
has the right length
run
has basic support
run
works with unicode
run
RegExp
run
#toString()
run
literals
run
should return correct flags and in correct order
run
objects
run
should return correct flags and in correct order