Skip to content

Commit 8d6ccdb

Browse files
committed
chore: add test for cache disabling
1 parent f053b3b commit 8d6ccdb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/connectivity/src/scp-cf/destination/destination-cache.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,22 @@ describe('destination cache', () => {
205205
expect(c2).toBeUndefined();
206206
});
207207

208+
it('does not use cache if caching is explicitly disabled', async () => {
209+
mockDestinationsWithSameName();
210+
211+
await getDestination({
212+
destinationName: 'SubscriberDest',
213+
jwt: subscriberUserToken,
214+
useCache: false
215+
});
216+
217+
const c1 = await getSubscriberCache('tenant');
218+
const c2 = await getProviderCache('tenant');
219+
220+
expect(c1).toBeUndefined();
221+
expect(c2).toBeUndefined();
222+
});
223+
208224
it('caches only provider if selection strategy always provider', async () => {
209225
await getDestination({
210226
destinationName: 'ProviderDest',

0 commit comments

Comments
 (0)