2017-06-23 17:08:58 +02:00
|
|
|
// Copyright (c) 2017 Rick Waldron. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
|
|
|
/*---
|
|
|
|
description: >
|
2017-06-23 17:55:26 +02:00
|
|
|
Including sta.js will expose two functions:
|
|
|
|
|
|
|
|
Test262Error
|
|
|
|
$ERROR
|
|
|
|
|
2017-06-23 17:08:58 +02:00
|
|
|
Assert that global $ERROR is overridable
|
|
|
|
---*/
|
|
|
|
function BaloneyError() {}
|
|
|
|
|
|
|
|
// Override $ERROR
|
|
|
|
$ERROR = function() {
|
|
|
|
throw new BaloneyError();
|
|
|
|
};
|
|
|
|
|
|
|
|
assert.throws(BaloneyError, function() {
|
|
|
|
$ERROR();
|
|
|
|
});
|