Skip to content

Commit

Permalink
v0.9.3 - offers fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelavoyan committed May 30, 2024
1 parent dc533ab commit 41c6145
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/sample-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@fastify/autoload": "~5.7.1",
"env-var": "~7.3.0",
"fastify": "~4.15.0",
"@velocitycareerlabs/vnf-nodejs-wallet-sdk": "^0.9.2"
"@velocitycareerlabs/vnf-nodejs-wallet-sdk": "^0.9.3"
},
"devDependencies": {
"@jest/globals": "~29.5.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@velocitycareerlabs/vnf-nodejs-wallet-sdk",
"version": "0.9.2",
"version": "0.9.3",
"description": "VNF Wallet SDK Nodejs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/api/entities/VCLOffers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class VCLOffers {
public readonly payload: Dictionary<any>,
public readonly all: VCLOffer[],
public readonly responseCode: number,
public readonly token: VCLToken,
public readonly sessionToken: VCLToken,
public readonly challenge: Nullish<string> = null
) {}

Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/test/entities/VCLOffers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe("VCLOffers tests", () => {

const testExpectations = (subject: VCLOffers) => {
expect(subject.responseCode).toBe(123);
expect(subject.token).toStrictEqual(new VCLToken('some token'));
expect(subject.sessionToken).toStrictEqual(new VCLToken('some token'));
expect(subject.all.length).toBe(11);
}
})
8 changes: 4 additions & 4 deletions packages/sdk/test/usecases/GenerateOffersUseCase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("GenerateOffersUseCase Tests", () => {
expect(generatedOffers?.all[0]).toStrictEqual(expectedOffer1);
expect(generatedOffers?.all[1]).toStrictEqual(expectedOffer2);
expect(generatedOffers?.challenge).toBe(GenerateOffersMocks.Challenge);
expect(generatedOffers?.token).toStrictEqual(CommonMocks.Token);
expect(generatedOffers?.sessionToken).toStrictEqual(CommonMocks.Token);
});

test("testGenerateOffersJsonArr", async () => {
Expand Down Expand Up @@ -73,7 +73,7 @@ describe("GenerateOffersUseCase Tests", () => {
expect(generatedOffers?.all[0]).toStrictEqual(expectedOffer1);
expect(generatedOffers?.all[1]).toStrictEqual(expectedOffer2);
expect(generatedOffers?.challenge).toBeNull()
expect(generatedOffers?.token).toStrictEqual(CommonMocks.Token);
expect(generatedOffers?.sessionToken).toStrictEqual(CommonMocks.Token);
});

test("testGenerateOffersEmptyJsonObj", async () => {
Expand Down Expand Up @@ -101,7 +101,7 @@ describe("GenerateOffersUseCase Tests", () => {
expect(generatedOffers?.payload).toStrictEqual({});
expect(generatedOffers?.all).toStrictEqual([]);
expect(generatedOffers?.challenge).toBeNull();
expect(generatedOffers?.token).toStrictEqual(CommonMocks.Token);
expect(generatedOffers?.sessionToken).toStrictEqual(CommonMocks.Token);
});

test("testGenerateOffersEmptyJsonArr", async () => {
Expand Down Expand Up @@ -129,6 +129,6 @@ describe("GenerateOffersUseCase Tests", () => {
expect(generatedOffers?.payload).toStrictEqual([]);
expect(generatedOffers?.all).toStrictEqual([]);
expect(generatedOffers?.challenge).toBeNull();
expect(generatedOffers?.token).toStrictEqual(CommonMocks.Token);
expect(generatedOffers?.sessionToken).toStrictEqual(CommonMocks.Token);
});
});

0 comments on commit 41c6145

Please sign in to comment.