Skip to content

Commit 65486e6

Browse files
committed
fix test
1 parent b81f75d commit 65486e6

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

tests/warp-drive__schema-record/tests/polaris/alias-field-read-test.ts

+17-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,14 @@ module('Reads | Alias fields', function (hooks) {
8383
'1000000.009',
8484
'cache value for netWorth is correct'
8585
);
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');
8794
assert.strictEqual(
8895
resource.attributes?.rawNetWorth,
8996
'1000000.009',
@@ -104,7 +111,15 @@ module('Reads | Alias fields', function (hooks) {
104111
'1000000.01',
105112
'cache value for netWorth is correct'
106113
);
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');
108123
assert.strictEqual(
109124
resource2.attributes?.rawNetWorth,
110125
'1000000.01',

0 commit comments

Comments
 (0)