Skip to content

Commit

Permalink
Fixed the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dickwolff committed Jul 30, 2024
1 parent 1cd7e6c commit 9979781
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/converters/bitvavoConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe("bitvavoConverter", () => {
const sut = new BitvavoConverter(new SecurityService());

let tempFileContent = "";
tempFileContent += "Timezone,Date,Time,Type,Currency,Amount,Price (EUR),EUR received / paid,Fee currency,Fee amount,Status,Transaction ID,Address\n";
tempFileContent += "Timezone,Date,Time,Type,Currency,Amount,Quote Currency,Quote Price,Received / Paid Currency,Received / Paid Amount,Fee currency,Fee amount,Status,Transaction ID,Address\n";

// Act
sut.processFileContents(tempFileContent, () => { done.fail("Should not succeed!"); }, (err: Error) => {
Expand All @@ -83,15 +83,15 @@ describe("bitvavoConverter", () => {
const sut = new BitvavoConverter(new SecurityService());

let tempFileContent = "";
tempFileContent += "Timezone,Date,Time,Type,Currency,Amount,Price (EUR),EUR received / paid,Fee currency,Fee amount,Status,Transaction ID,Address\n";
tempFileContent += "Europe/Amsterdam,2023-01-09,17:19:11,withdrawal,USDT,-32.156874000000003,,,USDT,5.4,Completed,1d0165bb-065f-4f0d-ba44-fb137534e010,0xaeC107aC155cA21A896888fe486de410c422424a,,"
tempFileContent += "Timezone,Date,Time,Type,Currency,Amount,Quote Currency,Quote Price,Received / Paid Currency,Received / Paid Amount,Fee currency,Fee amount,Status,Transaction ID,Address\n";
tempFileContent += "Europe/Amsterdam,2023-01-09,17:19:11,withdrawal,USDT,-32.156874000000003,,,,,USDT,5.4,Completed,1d0165bb-065f-4f0d-ba44-fb137534e010,0xaeC107aC155cA21A896888fe486de410c422424a,,"

// Act
sut.processFileContents(tempFileContent, () => { done.fail("Should not succeed!"); }, (err: Error) => {

// Assert
expect(err).toBeTruthy();
expect(err.message).toBe("An error ocurred while parsing! Details: Invalid Record Length: columns length is 13, got 15 on line 2");
expect(err.message).toBe("An error ocurred while parsing! Details: Invalid Record Length: columns length is 15, got 17 on line 2");

done();
});
Expand Down

0 comments on commit 9979781

Please sign in to comment.