Skip to content
Snippets Groups Projects
  • Sam Mikes's avatar
    c650b1a9
    ES5.S15: new tests to clarify Array.concat · c650b1a9
    Sam Mikes authored
    Test of spec language from 15.4.4.4,
    5.b.iii.3.b states 'Call the [[DefineOwnProeprty]] internal method of A'
    which means that the result of Array.prototype.concat
    should return `true` from `hasOwnProperty` for every property
    created by `concat`, up to `length`
    
    Set length to 3.
    a[0] is set to 0 on a
    a[1] is unset
    a[2] is set to 2 via a prototype of a
    
    add assertions for values of b[0], b[1], b[2]
    add assertions for b.hasOwnProperty('2')
    
    Check with Array.prototype and Object.prototype, separate tests
    
    fix typo in assertion message
    
    test was correct, but assertion message was incorrect
    c650b1a9
    History
    ES5.S15: new tests to clarify Array.concat
    Sam Mikes authored
    Test of spec language from 15.4.4.4,
    5.b.iii.3.b states 'Call the [[DefineOwnProeprty]] internal method of A'
    which means that the result of Array.prototype.concat
    should return `true` from `hasOwnProperty` for every property
    created by `concat`, up to `length`
    
    Set length to 3.
    a[0] is set to 0 on a
    a[1] is unset
    a[2] is set to 2 via a prototype of a
    
    add assertions for values of b[0], b[1], b[2]
    add assertions for b.hasOwnProperty('2')
    
    Check with Array.prototype and Object.prototype, separate tests
    
    fix typo in assertion message
    
    test was correct, but assertion message was incorrect
S15.4.4.4_A3_T2.js 1.63 KiB