mirror of
https://github.com/primedigitaltech/azon_seeker.git
synced 2026-10-05 15:22:59 +08:00
14 lines
490 B
TypeScript
14 lines
490 B
TypeScript
import assert from 'node:assert/strict';
|
|
import { isBackForwardCachePortError } from '../webext-bridge/src/internal/port-disconnect';
|
|
|
|
assert.equal(
|
|
isBackForwardCachePortError(
|
|
'The page keeping the extension port is moved into back/forward cache, so the message channel is closed.',
|
|
),
|
|
true,
|
|
);
|
|
assert.equal(isBackForwardCachePortError('Extension context invalidated.'), false);
|
|
assert.equal(isBackForwardCachePortError(), false);
|
|
|
|
console.log('Port disconnect tests passed.');
|