@@ -107,7 +107,7 @@ test('If there\'s already a permissions field', (t) => {
107107 ( ) => {
108108 embedPermissions ( t . context . schema , { permissions : true } , [ 'manager' ] , doc ) ;
109109 } ,
110- Error ,
110+ null ,
111111 'An error should be thrown when a permissions key is already present in the target object' ,
112112 ) ;
113113} ) ;
@@ -118,37 +118,37 @@ test('Verify that the permissions data cannot be changed', (t) => {
118118
119119 t . throws (
120120 ( ) => { doc . permissions = { } ; } ,
121- Error ,
121+ null ,
122122 'The permissions object shouldn\'t be writable overall' ,
123123 ) ;
124124
125125 t . throws (
126126 ( ) => { doc . permissions . read = [ ] ; } ,
127- Error ,
127+ null ,
128128 'The permissions object shouldn\'t be writable [read]' ,
129129 ) ;
130130
131131 t . throws (
132132 ( ) => { doc . permissions . write = [ ] ; } ,
133- Error ,
133+ null ,
134134 'The permissions object shouldn\'t be writable [write]' ,
135135 ) ;
136136
137137 t . throws (
138138 ( ) => { doc . permissions . remove = false ; } ,
139- Error ,
139+ null ,
140140 'The permissions object shouldn\'t be writable [remove]' ,
141141 ) ;
142142
143143 t . throws (
144144 ( ) => { doc . permissions . actions = [ ] ; } ,
145- Error ,
145+ null ,
146146 'The permissions object shouldn\'t be writable [actions]' ,
147147 ) ;
148148
149149 t . throws (
150150 ( ) => { doc . permissions = { } ; } ,
151- Error ,
151+ null ,
152152 'The permissions field should not be writable' ,
153153 ) ;
154154
0 commit comments