@@ -94,6 +94,7 @@ describe('createMany() ->', () => {
9494 args : {
9595 records : [ { name : 'newName' , contacts : { email : 'mail' } } ] ,
9696 } ,
97+ projection : { error : true } ,
9798 } ) ;
9899 expect ( result . recordIds ) . toBeTruthy ( ) ;
99100 } ) ;
@@ -105,6 +106,7 @@ describe('createMany() ->', () => {
105106 { name : 'newName0' , contacts : { email : 'mail' } } ,
106107 { name : 'newName1' , contacts : { email : 'mail' } } ,
107108 ] ,
109+ projection : { error : true } ,
108110 } ,
109111 } ) ;
110112 expect ( result . createCount ) . toBe ( 2 ) ;
@@ -134,6 +136,7 @@ describe('createMany() ->', () => {
134136 { name : checkedName , contacts : { email : 'mail' } } ,
135137 { name : checkedName , contacts : { email : 'mail' } } ,
136138 ] ,
139+ projection : { error : true } ,
137140 } ,
138141 } ) ;
139142
@@ -147,6 +150,7 @@ describe('createMany() ->', () => {
147150 const result = await createMany ( UserModel , UserTC ) . resolve ( {
148151 args : {
149152 records : [ { name : 'NewUser' , contacts : { email : 'mail' } } ] ,
153+ projection : { error : true } ,
150154 } ,
151155 } ) ;
152156 expect ( result . records [ 0 ] . _id ) . toBe ( result . recordIds [ 0 ] ) ;
@@ -155,6 +159,7 @@ describe('createMany() ->', () => {
155159 it ( 'should return mongoose documents' , async ( ) => {
156160 const result = await createMany ( UserModel , UserTC ) . resolve ( {
157161 args : { records : [ { name : 'NewUser' , contacts : { email : 'mail' } } ] } ,
162+ projection : { error : true } ,
158163 } ) ;
159164 expect ( result . records [ 0 ] ) . toBeInstanceOf ( UserModel ) ;
160165 } ) ;
@@ -166,6 +171,7 @@ describe('createMany() ->', () => {
166171 { name : 'NewUser0' , contacts : { email : 'mail' } } ,
167172 { name : 'NewUser1' , contacts : { email : 'mail' } } ,
168173 ] ,
174+ projection : { error : true } ,
169175 } ,
170176 context : { ip : '1.1.1.1' } ,
171177 beforeRecordMutate : ( record : any , rp : ExtendedResolveParams ) => {
@@ -203,6 +209,7 @@ describe('createMany() ->', () => {
203209 { name : 'NewUser0' , contacts : { email : 'mail' } } ,
204210 { name : 'NewUser1' , contacts : { email : 'mail' } } ,
205211 ] ,
212+ projection : { error : true } ,
206213 } ,
207214 context : { ip : '1.1.1.1' } ,
208215 beforeRecordMutate : ( record : any , rp : ExtendedResolveParams ) => {
0 commit comments