File tree Expand file tree Collapse file tree
packages/@glimmer/validator/test/collections Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,11 @@ module('@glimmer/validator: trackedMap', function () {
5252 test ( 'getOrInsert' , ( assert ) => {
5353 const map = trackedMap ( ) ;
5454
55- if ( 'getOrInsert' in map && typeof map . getOrInsert === 'function' ) {
55+ if (
56+ 'getOrInsert' in map &&
57+ typeof map . getOrInsert === 'function' &&
58+ 'getOrInsert' in Map . prototype
59+ ) {
5660 let v = map . getOrInsert ( 'foo' , 123 ) ;
5761 assert . strictEqual ( v , 123 ) ;
5862
@@ -68,7 +72,11 @@ module('@glimmer/validator: trackedMap', function () {
6872 test ( 'getOrInsertComputed' , ( assert ) => {
6973 const map = trackedMap ( ) ;
7074
71- if ( 'getOrInsertComputed' in map && typeof map . getOrInsertComputed === 'function' ) {
75+ if (
76+ 'getOrInsertComputed' in map &&
77+ typeof map . getOrInsertComputed === 'function' &&
78+ 'getOrInsertComputed' in Map . prototype
79+ ) {
7280 let v = map . getOrInsertComputed ( 'foo' , ( key : string ) => `${ key } !` ) ;
7381 assert . strictEqual ( v , 'foo!' ) ;
7482
You can’t perform that action at this time.
0 commit comments