diff --git a/implementations/javascript/packages/core/test/test-utils.ts b/implementations/javascript/packages/core/test/test-utils.ts index 251864d..73c6fd8 100644 --- a/implementations/javascript/packages/core/test/test-utils.ts +++ b/implementations/javascript/packages/core/test/test-utils.ts @@ -28,7 +28,7 @@ expect.extend({ return { message: () => preserves`expected an exception not matching the filter`, pass: true }; } else { - return { message: () => preserves`expected an exception matching the filter: ${e.constructor.name}`, + return { message: () => preserves`expected an exception matching the filter: ${(e as any)?.constructor?.name}`, pass: false }; } } diff --git a/implementations/javascript/packages/schema/test/checker.test.ts b/implementations/javascript/packages/schema/test/checker.test.ts index 35920c5..cf455e8 100644 --- a/implementations/javascript/packages/schema/test/checker.test.ts +++ b/implementations/javascript/packages/schema/test/checker.test.ts @@ -32,8 +32,8 @@ describe('checker', () => { definitions: { ExtensibleRecord: - >, >] - >>>}}>`).next()); + >, >] + >>>}}>`).next()); }); it('non-invertibility tail', () => { expect(() => readSchema( @@ -51,11 +51,11 @@ describe('checker', () => { expect(() => readSchema('version 1 . A = { x: @a string , y: @a string }.')) .toThrow(/duplicate binding named "a" in entry y in dictionary in A/); }); - it('complains about duplicates in tuple*s', () => { + it('complains about duplicates in tuplePrefixes', () => { expect(() => readSchema('version 1 . A = [@a string @b string @a int @rest any ...].')) .toThrow(/duplicate binding named "a" in item 2 of A/); }); - it('complains about duplicates in tuple* tails', () => { + it('complains about duplicates in tuplePrefix tails', () => { expect(() => readSchema('version 1 . A = [@a string @b string @c int @a any ...].')) .toThrow(/duplicate binding named "a" in tail of A/); }); @@ -113,7 +113,7 @@ describe('checker', () => { `version 1 . AAA = . ABC = . - A = @x AAA & @y ABC.`)) + A = @x AAA & @y ABC .`)) .toThrow(/in item 1 of fields of AAA/); }); it('is OK with seeming- but non-duplicates across named branches', () => { @@ -121,7 +121,7 @@ describe('checker', () => { `version 1 . AAA = . ABC = . - A = @x AAA & @y ABC.`)) + A = @x AAA & @y ABC .`)) .not.toBeNull(); }); it('complains about duplicate branch names', () => { @@ -129,7 +129,7 @@ describe('checker', () => { `version 1 . AAB = . ACD = . - A = @x AAB & @x ACD.`)) + A = @x AAB & @x ACD .`)) .toThrow(/in A/); }); }); diff --git a/implementations/javascript/packages/schema/test/test-utils.ts b/implementations/javascript/packages/schema/test/test-utils.ts index 42a8f09..d0b6766 100644 --- a/implementations/javascript/packages/schema/test/test-utils.ts +++ b/implementations/javascript/packages/schema/test/test-utils.ts @@ -27,7 +27,7 @@ expect.extend({ return { message: () => preserves`expected an exception not matching the filter`, pass: true }; } else { - return { message: () => preserves`expected an exception matching the filter: ${e.constructor.name}`, + return { message: () => preserves`expected an exception matching the filter: ${(e as any)?.constructor?.name}`, pass: false }; } }