11import * as fs from "fs" ;
22import { describe } from "node:test" ;
3- import { create } from "@bufbuild/protobuf" ;
43import { Code , ConnectError } from "@connectrpc/connect" ;
54import { createAsyncIterable } from "@connectrpc/connect/protocol" ;
65import * as connectNode from "@connectrpc/connect-node" ;
76
87import {
98 CheckResponseSchema ,
109 ConfigError ,
10+ create ,
1111 createImportRequest ,
1212 DeleteManifestResponseSchema ,
1313 DeleteObjectResponseSchema ,
@@ -29,7 +29,7 @@ import {
2929 SetManifestResponseSchema ,
3030 SetObjectResponseSchema ,
3131 SetRelationResponseSchema ,
32- } from "../../../lib/index " ;
32+ } from "../../../lib" ;
3333jest . mock ( "fs" ) ;
3434
3535describe ( "DirectoryV3" , ( ) => {
@@ -466,6 +466,7 @@ describe("DirectoryV3", () => {
466466 $typeName : "aserto.directory.reader.v3.CheckResponse" ,
467467 check : true ,
468468 trace : [ ] ,
469+ toJSON : expect . any ( Function ) ,
469470 } ) ;
470471
471472 mockCheck . mockReset ( ) ;
@@ -516,6 +517,7 @@ describe("DirectoryV3", () => {
516517 id : "123" ,
517518 type : "" ,
518519 } ,
520+ toJSON : expect . any ( Function ) ,
519521 } ) ;
520522
521523 mockGetObject . mockReset ( ) ;
@@ -576,6 +578,7 @@ describe("DirectoryV3", () => {
576578 expect ( result ) . toEqual ( {
577579 $typeName : "aserto.directory.reader.v3.GetObjectsResponse" ,
578580 results : [ ] ,
581+ toJSON : expect . any ( Function ) ,
579582 } ) ;
580583
581584 mockGetObjects . mockReset ( ) ;
@@ -612,6 +615,7 @@ describe("DirectoryV3", () => {
612615 expect ( result ) . toEqual ( {
613616 $typeName : "aserto.directory.reader.v3.GetObjectsResponse" ,
614617 results : [ ] ,
618+ toJSON : expect . any ( Function ) ,
615619 } ) ;
616620
617621 mockGetObjects . mockReset ( ) ;
@@ -648,6 +652,7 @@ describe("DirectoryV3", () => {
648652 expect ( result ) . toEqual ( {
649653 $typeName : "aserto.directory.reader.v3.GetObjectsResponse" ,
650654 results : [ ] ,
655+ toJSON : expect . any ( Function ) ,
651656 } ) ;
652657
653658 mockGetObjects . mockReset ( ) ;
@@ -685,6 +690,7 @@ describe("DirectoryV3", () => {
685690 expect ( result ) . toEqual ( {
686691 $typeName : "aserto.directory.reader.v3.GetObjectsResponse" ,
687692 results : [ ] ,
693+ toJSON : expect . any ( Function ) ,
688694 } ) ;
689695
690696 mockGetObjects . mockReset ( ) ;
@@ -833,6 +839,7 @@ describe("DirectoryV3", () => {
833839 expect ( result ) . toEqual ( {
834840 $typeName : "aserto.directory.reader.v3.GetObjectManyResponse" ,
835841 results : [ ] ,
842+ toJSON : expect . any ( Function ) ,
836843 } ) ;
837844
838845 mockGetObjectMany . mockReset ( ) ;
@@ -881,6 +888,7 @@ describe("DirectoryV3", () => {
881888 $typeName : "aserto.directory.reader.v3.GetGraphResponse" ,
882889 results : [ ] ,
883890 trace : [ ] ,
891+ toJSON : expect . any ( Function ) ,
884892 } ) ;
885893
886894 mockGetGraph . mockReset ( ) ;
@@ -977,6 +985,7 @@ describe("DirectoryV3", () => {
977985 etag : "" ,
978986 } ,
979987 objects : { } ,
988+ toJSON : expect . any ( Function ) ,
980989 } ) ;
981990
982991 mockGetRelation . mockReset ( ) ;
@@ -1033,6 +1042,7 @@ describe("DirectoryV3", () => {
10331042 $typeName : "aserto.directory.reader.v3.GetRelationsResponse" ,
10341043 results : [ ] ,
10351044 objects : { } ,
1045+ toJSON : expect . any ( Function ) ,
10361046 } ) ;
10371047
10381048 mockGetRelations . mockReset ( ) ;
@@ -1145,6 +1155,7 @@ describe("DirectoryV3", () => {
11451155 expect ( result ) . toEqual ( {
11461156 $typeName : "aserto.directory.writer.v3.DeleteRelationResponse" ,
11471157 result : { $typeName : "google.protobuf.Empty" } ,
1158+ toJSON : expect . any ( Function ) ,
11481159 } ) ;
11491160
11501161 mockDeleteRelation . mockReset ( ) ;
@@ -1198,6 +1209,7 @@ describe("DirectoryV3", () => {
11981209 body : "test" ,
11991210 etag : "" ,
12001211 updatedAt : undefined ,
1212+ toJSON : expect . any ( Function ) ,
12011213 } ) ;
12021214
12031215 getManifestMock . mockReset ( ) ;
@@ -1228,6 +1240,7 @@ describe("DirectoryV3", () => {
12281240 expect ( result ) . toEqual ( {
12291241 $typeName : "aserto.directory.model.v3.SetManifestResponse" ,
12301242 result : { $typeName : "google.protobuf.Empty" } ,
1243+ toJSON : expect . any ( Function ) ,
12311244 } ) ;
12321245
12331246 mockSetManifest . mockReset ( ) ;
@@ -1255,6 +1268,7 @@ describe("DirectoryV3", () => {
12551268 const result = await directory . deleteManifest ( ) ;
12561269 expect ( result ) . toEqual ( {
12571270 $typeName : "aserto.directory.model.v3.DeleteManifestResponse" ,
1271+ toJSON : expect . any ( Function ) ,
12581272 } ) ;
12591273
12601274 mockDeleteManifest . mockReset ( ) ;
0 commit comments