Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
lmuntaner committed Apr 24, 2024
1 parent 2bde516 commit b69eb89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js-library/src/tests/request-verifiable-presentation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ describe("Request Verifiable Credentials function", () => {
window.open = vi.fn();
});

it("calls onSuccess with a valid ", async () => {
it("calls onSuccess with a verifiable presentation", async () =>
new Promise<void>((done) => {
const onError = vi.fn();
requestVerifiablePresentation({
onSuccess: () => {
onSuccess: (presentation: string) => {
expect(presentation).toEqual(verifiablePresentation);
expect(onError).not.toHaveBeenCalled();
done();
},
Expand All @@ -56,8 +57,7 @@ describe("Request Verifiable Credentials function", () => {
expect(window.open).toHaveBeenCalledTimes(1);
window.postMessage(VcFlowReady, "*");
window.postMessage(vcVerifiablePresentationMessage, relyingPartyOrigin);
});
});
}));

it("calls onSuccess with a verifiable presentation", async () =>
new Promise<void>((done) => {
Expand Down

0 comments on commit b69eb89

Please sign in to comment.