Skip to content

Commit

Permalink
Setup describe blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
technoplato committed Mar 26, 2024
1 parent 864ebc2 commit def6518
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions libs/permissions/permissionLogic/src/lib/permission-logic.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,34 @@ export const EmptyPermissionSubscriberMap: PermissionSubscriberMap =
}),
{} as PermissionSubscriberMap
);
export type PermissionsMonitoringMachineContext = {
permissionsStatuses: PermissionStatusMapType;
permissionSubscribers: PermissionSubscriberMap;
};

describe('Permission Monitoring Machine', () => {
describe('Subscriptions', () => {
describe('Single Subscriber', () => {
it('should allow subscriptions from a subscriber to any permissions', () => {
// TODO
/*
$$$$$$$$\ $$$$$$\ $$$$$$$\ $$$$$$\
\__$$ __|$$ __$$\ $$ __$$\ $$ __$$\
$$ | $$ / $$ |$$ | $$ |$$ / $$ |
$$ | $$ | $$ |$$ | $$ |$$ | $$ |
$$ | $$ | $$ |$$ | $$ |$$ | $$ |
$$ | $$ | $$ |$$ | $$ |$$ | $$ |
$$ | $$$$$$ |$$$$$$$ | $$$$$$ |
\__| \______/ \_______/ \______/
*/
});
});
});
it('handle the happy path of being invoked, checking permission initially and then handle a permission request', async () => {
const permissionMonitoringMachine = setup({
types: {} as {
events: PermissionMonitoringMachineEvents;
context: {
permissionsStatuses: PermissionStatusMapType;
permissionSubscribers: PermissionSubscriberMap;
};
context: PermissionsMonitoringMachineContext;
},
actors: {
applicationLifecycleReportingMachine:
Expand Down

0 comments on commit def6518

Please sign in to comment.