Skip to content

Commit 6c8f756

Browse files
authored
chore: improve tests and fix typo (#311)
1 parent 7ef504c commit 6c8f756

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/plugins/policy/plugin.zmodel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Defines an access policy that allows a set of operations when the given condition is true.
33
*
4-
* @param operation: comma-separated list of "create", "read", "update", "post-update", " "delete". Use "all" to denote all operations.
4+
* @param operation: comma-separated list of "create", "read", "update", "post-update", "delete". Use "all" to denote all operations.
55
* @param condition: a boolean expression that controls if the operation should be allowed.
66
*/
77
attribute @@allow(_ operation: String @@@completionHint(["'create'", "'read'", "'update'", "'post-update'","'delete'", "'all'"]), _ condition: Boolean)

packages/testtools/src/utils.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { loadDocument } from '@zenstackhq/language';
2-
import path from 'node:path';
32

43
export function loadDocumentWithPlugins(filePath: string) {
5-
const pluginModelFiles = [path.resolve(__dirname, '../node_modules/@zenstackhq/plugin-policy/plugin.zmodel')];
4+
const pluginModelFiles = [require.resolve('@zenstackhq/plugin-policy/plugin.zmodel')];
65
return loadDocument(filePath, pluginModelFiles);
76
}

0 commit comments

Comments
 (0)