@@ -83,7 +83,14 @@ module('Reads | Alias fields', function (hooks) {
83
83
'1000000.009' ,
84
84
'cache value for netWorth is correct'
85
85
) ;
86
- assert . strictEqual ( store . cache . getAttr ( identifier , 'netWorth' ) , undefined , 'not caching the alias field' ) ;
86
+ const rawCache = store . cache . __cache . get ( identifier ) ;
87
+ const current = Object . assign (
88
+ Object . assign ( { } , rawCache ?. remoteAttrs , rawCache ?. inflightAttrs ) ,
89
+ rawCache ?. localAttrs ,
90
+ rawCache ?. defaultAttrs
91
+ ) ;
92
+ assert . false ( 'netWorth' in current , 'not caching the alias field' ) ;
93
+ assert . strictEqual ( current . netWorth , undefined , 'not caching the alias field' ) ;
87
94
assert . strictEqual (
88
95
resource . attributes ?. rawNetWorth ,
89
96
'1000000.009' ,
@@ -104,7 +111,15 @@ module('Reads | Alias fields', function (hooks) {
104
111
'1000000.01' ,
105
112
'cache value for netWorth is correct'
106
113
) ;
107
- assert . strictEqual ( store . cache . getAttr ( identifier2 , 'netWorth' ) , undefined , 'not caching the alias field' ) ;
114
+
115
+ const rawCache2 = store . cache . __cache . get ( identifier2 ) ;
116
+ const current2 = Object . assign (
117
+ Object . assign ( { } , rawCache2 ?. remoteAttrs , rawCache2 ?. inflightAttrs ) ,
118
+ rawCache2 ?. localAttrs ,
119
+ rawCache2 ?. defaultAttrs
120
+ ) ;
121
+ assert . false ( 'netWorth' in current2 , 'not caching the alias field' ) ;
122
+ assert . strictEqual ( current2 . netWorth , undefined , 'not caching the alias field' ) ;
108
123
assert . strictEqual (
109
124
resource2 . attributes ?. rawNetWorth ,
110
125
'1000000.01' ,
0 commit comments