test/mjsunit/array-sort.js
// The following test ensures that [[Delete]] is called and it throws.
The following test ensures that [[Delete]] is called and it throws.
The following test ensures that [[ Delete ]] is called and it throws .
function TestArrayWithAccessorThrowsOnDelete() {
  let array = [5, 4, 1, , ];
  Object.defineProperty(array, '4', {
    get: () => array.foo,
    set: (val) => array.foo = val
  });
  assertThrows(() => array.sort((a, b) => a - b), TypeError);
}
function TestArrayWithAccessorThrowsOnDelete ( ) { let array = [ 5 , 4 , 1 , , ] ; Object . defineProperty ( array , '4' , { get : ( ) => array . foo , set : ( val ) => array . foo = val } ) ; assertThrows ( ( ) => array . sort ( ( a , b ) => a - b ) , TypeError ) ; }
The following test ensures that [[Delete]] is called and it throws.
The following test ensures that [[ Delete ]] is called and it throws .
/*hole*/ /*hole*/