1
1
function buildMockPromise ( settledValue , shouldFulfill ) {
2
- // Support IE 9: Promise not supported, test MUST NOT load polyfil globally.
3
2
// Support SpiderMonkey: setTimeout is not supported, but native Promise is.
4
3
var defer = typeof setTimeout !== 'undefined'
5
4
// eslint-disable-next-line no-undef
@@ -362,8 +361,6 @@ QUnit.test('throws', function (assert) {
362
361
) ;
363
362
} , / ^ E r r o r : a s s e r t \. t h r o w s d o e s n o t a c c e p t a s t r i n g v a l u e f o r t h e e x p e c t e d a r g u m e n t / ) ;
364
363
365
- // This test is for IE 7 and prior which does not properly
366
- // implement Error.prototype.toString
367
364
assert . throws (
368
365
function ( ) {
369
366
throw new Error ( 'error message' ) ;
@@ -396,10 +393,6 @@ QUnit.test('throws', function (assert) {
396
393
'thrown TypeError with a message is an instance of Error'
397
394
) ;
398
395
399
- // This test is for IE 8 and prior which goes against the standards
400
- // by considering that the native Error constructors, such TypeError,
401
- // are also instances of the Error constructor. As such, the assertion
402
- // sometimes went down the wrong path.
403
396
assert . throws (
404
397
function ( ) {
405
398
throw new TypeError ( 'error message' ) ;
@@ -604,8 +597,6 @@ QUnit.test('rejects', function (assert) {
604
597
"simple string rejection, no 'expected' value given"
605
598
) ;
606
599
607
- // This test is for IE 7 and prior which does not properly
608
- // implement Error.prototype.toString
609
600
assert . rejects (
610
601
buildMockPromise ( new Error ( 'error message' ) ) ,
611
602
/ e r r o r m e s s a g e / ,
@@ -630,10 +621,6 @@ QUnit.test('rejects', function (assert) {
630
621
'thrown TypeError with a message is an instance of Error'
631
622
) ;
632
623
633
- // This test is for IE 8 and prior which goes against the standards
634
- // by considering that the native Error constructors, such TypeError,
635
- // are also instances of the Error constructor. As such, the assertion
636
- // sometimes went down the wrong path.
637
624
assert . rejects (
638
625
buildMockPromise ( new TypeError ( 'error message' ) ) ,
639
626
TypeError ,
0 commit comments