diff --git a/packages/untp-test-suite/integration/cli/untpTest.integration.test.ts b/packages/untp-test-suite/integration/cli/untpTest.integration.test.ts index 15e91402..8085374a 100644 --- a/packages/untp-test-suite/integration/cli/untpTest.integration.test.ts +++ b/packages/untp-test-suite/integration/cli/untpTest.integration.test.ts @@ -279,7 +279,7 @@ describe("CLI 'untp test' Commands with remote schema", () => { it('should show FAIL in the report when data invalidate', () => { expect(stdout).toMatch(/FAIL/); expect(stdout).toMatch(/Your credentials are not UNTP compliant/); - expect(stdout).toContain('url field Failed to fetch data '); + expect(stdout).toContain('schema field Failed to fetch data '); expect(stdout).toContain(`field must have required property 'id'.`); expect(stdout).toContain(`url field The URL 'in-valid-url' is not a valid URL..`); expect(stdout).toContain(`url field The URL 'abc://example.com' must use http or https protocol..`); @@ -338,7 +338,7 @@ describe("CLI 'untp test' Commands with remote schema", () => { expect(stdout).toMatch(/FAIL/); expect(stdout).toMatch(/Your credentials are not UNTP compliant/); expect(stdout).toContain('Additional property found'); - expect(stdout).toContain('url field Failed to fetch data from the URL'); + expect(stdout).toContain('schema field Failed to fetch data from the URL'); }); }); }); diff --git a/packages/untp-test-suite/integration/lib/lib.integration.test.ts b/packages/untp-test-suite/integration/lib/lib.integration.test.ts index 3d078eab..bef884a2 100644 --- a/packages/untp-test-suite/integration/lib/lib.integration.test.ts +++ b/packages/untp-test-suite/integration/lib/lib.integration.test.ts @@ -63,15 +63,21 @@ describe('lib.integration.test.ts', () => { }; it('should throw an error when the credential is contain version empty', async () => { - await expect( - testCredentialHandler( - { - type: 'objectEvent', - version: '', - }, - testDataMock, - ), - ).rejects.toThrow('ENOENT: no such file or directory'); + const result = await testCredentialHandler( + { + type: 'objectEvent', + version: '', + }, + testDataMock, + ); + + expect(result.errors).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + message: expect.stringContaining('ENOENT: no such file or directory'), + }), + ]), + ); }); });