@@ -5,7 +5,7 @@ import { Uri } from "@polywrap/core-js";
55import { GetPathToTestWrappers } from "@polywrap/test-cases" ;
66import { PolywrapClient } from "../.." ;
77import { WrapError , WrapErrorCode } from "@polywrap/core-js" ;
8- import { incompatiblePlugin , mockPluginRegistration } from "../helpers" ;
8+ import { mockPluginRegistration } from "../helpers" ;
99import { msgpackDecode , msgpackEncode } from "@polywrap/msgpack-js" ;
1010import {
1111 ClientConfigBuilder ,
@@ -52,7 +52,7 @@ describe("Error structure", () => {
5252 expect ( result . error ?. reason ) . toContain ( "A URI Resolver returned an error." ) ;
5353 expect (
5454 result . error ?. uri . endsWith (
55- "packages/test-cases/wrappers/subinvoke/00-subinvoke/implementations/as-not-found"
55+ "packages/test-cases/build/../ wrappers/subinvoke/00-subinvoke/implementations/as-not-found"
5656 )
5757 ) . toBeTruthy ( ) ;
5858 expect ( result . error ?. resolutionStack ) . toBeTruthy ( ) ;
@@ -75,7 +75,7 @@ describe("Error structure", () => {
7575 expect ( result . error ?. reason ) . toContain ( "SubInvocation exception encountered" ) ;
7676 expect (
7777 result . error ?. uri . endsWith (
78- "packages/test-cases/wrappers/subinvoke/02-consumer/implementations/as"
78+ "packages/test-cases/build/../ wrappers/subinvoke/02-consumer/implementations/as"
7979 )
8080 ) . toBeTruthy ( ) ;
8181 expect ( result . error ?. method ) . toEqual ( "throwError" ) ;
@@ -116,7 +116,7 @@ describe("Error structure", () => {
116116 expect ( result . error ?. reason . startsWith ( "__wrap_abort:" ) ) . toBeTruthy ( ) ;
117117 expect (
118118 result . error ?. uri . endsWith (
119- "packages/test-cases/wrappers/subinvoke/00-subinvoke/implementations/as"
119+ "packages/test-cases/build/../ wrappers/subinvoke/00-subinvoke/implementations/as"
120120 )
121121 ) . toBeTruthy ( ) ;
122122 expect ( result . error ?. method ) . toEqual ( "add" ) ;
@@ -145,7 +145,7 @@ describe("Error structure", () => {
145145 ) . toBeTruthy ( ) ;
146146 expect (
147147 result . error ?. uri . endsWith (
148- "packages/test-cases/wrappers/subinvoke/00-subinvoke/implementations/as"
148+ "packages/test-cases/build/../ wrappers/subinvoke/00-subinvoke/implementations/as"
149149 )
150150 ) . toBeTruthy ( ) ;
151151 expect ( result . error ?. method ) . toEqual ( "notExistingMethod" ) ;
@@ -188,7 +188,7 @@ describe("Error structure", () => {
188188 ) . toBeTruthy ( ) ;
189189 expect (
190190 result . error ?. uri . endsWith (
191- "packages/test-cases/wrappers/subinvoke/02-consumer/implementations/as"
191+ "packages/test-cases/build/../ wrappers/subinvoke/02-consumer/implementations/as"
192192 )
193193 ) . toBeTruthy ( ) ;
194194 expect ( result . error ?. method ) . toEqual ( "throwError" ) ;
@@ -264,29 +264,6 @@ describe("Error structure", () => {
264264 ) ;
265265 } ) ;
266266
267- test . skip ( "Invoke a plugin with incompatible version" , async ( ) => {
268- const builder = new ClientConfigBuilder ( ) ;
269- const config = builder
270- . addPackage ( "wrap://ens/plugin.eth" , incompatiblePlugin ( ) )
271- . build ( ) ;
272- const client = new PolywrapClient ( config ) ;
273- const result = await client . invoke < string > ( {
274- uri : "wrap://ens/plugin.eth" ,
275- method : "getData" ,
276- } ) ;
277-
278- expect ( result . ok ) . toBeFalsy ( ) ;
279- if ( result . ok ) throw Error ( "should never happen" ) ;
280-
281- expect ( result . error ?. name ) . toEqual ( "WrapError" ) ;
282- expect ( result . error ?. code ) . toEqual ( WrapErrorCode . URI_RESOLVER_ERROR ) ;
283- expect ( result . error ?. uri . endsWith ( "plugin.eth" ) ) . toBeTruthy ( ) ;
284- expect ( result . error ?. resolutionStack ) . toBeDefined ( ) ;
285- expect ( `${ result . error ?. cause } ` ) . toContain (
286- `Unrecognized WrapManifest schema version "0.0.0.5"`
287- ) ;
288- } ) ;
289-
290267 afterAll ( ( ) => {
291268 fs . rmdirSync ( "tmp" , { recursive : true } ) ;
292269 } ) ;
@@ -315,7 +292,7 @@ describe("Error structure", () => {
315292 expect ( result . error ?. reason . startsWith ( "__wrap_abort:" ) ) . toBeTruthy ( ) ;
316293 expect (
317294 result . error ?. uri . endsWith (
318- "packages/test-cases/wrappers/subinvoke/00-subinvoke/implementations/rs"
295+ "packages/test-cases/build/../ wrappers/subinvoke/00-subinvoke/implementations/rs"
319296 )
320297 ) . toBeTruthy ( ) ;
321298 expect ( result . error ?. method ) . toEqual ( "add" ) ;
@@ -344,7 +321,7 @@ describe("Error structure", () => {
344321 ) . toBeTruthy ( ) ;
345322 expect (
346323 result . error ?. uri . endsWith (
347- "packages/test-cases/wrappers/subinvoke/00-subinvoke/implementations/rs"
324+ "packages/test-cases/build/../ wrappers/subinvoke/00-subinvoke/implementations/rs"
348325 )
349326 ) . toBeTruthy ( ) ;
350327 expect ( result . error ?. method ) . toEqual ( "notExistingMethod" ) ;
@@ -387,7 +364,7 @@ describe("Error structure", () => {
387364 ) . toBeTruthy ( ) ;
388365 expect (
389366 result . error ?. uri . endsWith (
390- "packages/test-cases/wrappers/subinvoke/02-consumer/implementations/rs"
367+ "packages/test-cases/build/../ wrappers/subinvoke/02-consumer/implementations/rs"
391368 )
392369 ) . toBeTruthy ( ) ;
393370 expect ( result . error ?. method ) . toEqual ( "throwError" ) ;
@@ -432,7 +409,7 @@ describe("Error structure", () => {
432409 uri : DefaultBundle . plugins . fileSystem . uri . uri ,
433410 method : "readFile" ,
434411 args : {
435- pathh : "packages/js/ client/src/__tests__/core/index.ts" ,
412+ pathh : "packages/client/src/__tests__/core/index.ts" ,
436413 } ,
437414 } ) ;
438415
@@ -449,7 +426,7 @@ describe("Error structure", () => {
449426 expect ( result . error ?. uri ) . toEqual ( DefaultBundle . plugins . fileSystem . uri . uri ) ;
450427 expect ( result . error ?. method ) . toEqual ( "readFile" ) ;
451428 expect ( result . error ?. args ) . toContain (
452- '{\n "pathh": "packages/js/ client/src/__tests__/core/index.ts"\n}'
429+ '{\n "pathh": "packages/client/src/__tests__/core/index.ts"\n}'
453430 ) ;
454431 expect ( result . error ?. source ?. file ) . toEqual (
455432 "node:internal/fs/promises"
@@ -496,7 +473,7 @@ describe("Error structure", () => {
496473 expect ( result . error ?. uri ) . toEqual ( "wrap://plugin/mock" ) ;
497474 expect (
498475 result . error ?. source ?. file ?. endsWith (
499- "packages/js/ client/src/__tests__/helpers.ts"
476+ "packages/client/src/__tests__/helpers.ts"
500477 )
501478 ) . toBeTruthy ( ) ;
502479 expect ( result . error ?. source ?. row ) . toEqual ( 47 ) ;
0 commit comments