-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbridgeAccess.test.js
More file actions
23 lines (19 loc) · 1.12 KB
/
bridgeAccess.test.js
File metadata and controls
23 lines (19 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { assert } from './test-utils/deps-node.js';
// We can't easily unit-test the API-calling functions without a real connection,
// but we can test the exported types compile and the permissionsMatch logic indirectly.
// The main integration test is in the bridge-mira tests.
// Import to verify the module loads correctly
import { getOrCreateBridgeAccess, ensureBridgeAccess } from '../ts/appTemplates/bridgeAccess.ts';
describe('[BACC] Bridge Access helpers', function () {
it('[BA01] should export both helper functions', () => {
assert.equal(typeof getOrCreateBridgeAccess, 'function');
assert.equal(typeof ensureBridgeAccess, 'function');
});
it('[BA02] should be importable from appTemplates', async () => {
const appTemplates = await import('../ts/appTemplates/appTemplates.ts');
assert.equal(typeof appTemplates.getOrCreateBridgeAccess, 'function');
assert.equal(typeof appTemplates.ensureBridgeAccess, 'function');
// recreateBridgeAccess was dropped in Plan 58 Phase 4b — accesses.update replaces delete+create.
assert.equal(typeof appTemplates.recreateBridgeAccess, 'undefined');
});
});