Skip to content

Commit

Permalink
test: make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
import-brain committed Sep 20, 2022
1 parent 6f3176f commit 820aca1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
18 changes: 6 additions & 12 deletions test/__snapshots__/finance.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ exports[`finance > 42 > amount > with min 1`] = `"380.79"`;

exports[`finance > 42 > amount > with min and max and dec and symbol 1`] = `"$24.98160"`;

exports[`finance > 42 > bic > noArgs 1`] = `"JUYEPSSL"`;
exports[`finance > 42 > bic > noArgs 1`] = `"UYETSCLL"`;

exports[`finance > 42 > bic > with branch code 1`] = `"JUYEPSSLL5G"`;

exports[`finance > 42 > bic 1`] = `"JUYEPSSL"`;
exports[`finance > 42 > bic > with branch code 1`] = `"JUYEPSSL5G5"`;

exports[`finance > 42 > bitcoinAddress 1`] = `"3XbJMAAara64sSkA9HD24YHQWd1b"`;

Expand Down Expand Up @@ -84,11 +82,9 @@ exports[`finance > 1211 > amount > with min 1`] = `"929.24"`;

exports[`finance > 1211 > amount > with min and max and dec and symbol 1`] = `"$47.14081"`;

exports[`finance > 1211 > bic > noArgs 1`] = `"YLXUDE4Z"`;

exports[`finance > 1211 > bic > with branch code 1`] = `"YLXUDE4Z1O5"`;
exports[`finance > 1211 > bic > noArgs 1`] = `"LXUFBTZ15O7"`;

exports[`finance > 1211 > bic 1`] = `"YLXUDE4Z"`;
exports[`finance > 1211 > bic > with branch code 1`] = `"YLXUDE4ZXXX"`;

exports[`finance > 1211 > bitcoinAddress 1`] = `"1TMe8Z3EaFdLqmaGKP1LEEJQVriSZRZdsA"`;

Expand Down Expand Up @@ -152,11 +148,9 @@ exports[`finance > 1337 > amount > with min 1`] = `"269.40"`;

exports[`finance > 1337 > amount > with min and max and dec and symbol 1`] = `"$20.48098"`;

exports[`finance > 1337 > bic > noArgs 1`] = `"GOEFFIJG"`;

exports[`finance > 1337 > bic > with branch code 1`] = `"GOEFFIJG1B8"`;
exports[`finance > 1337 > bic > noArgs 1`] = `"OEFHLYG1"`;

exports[`finance > 1337 > bic 1`] = `"GOEFFIJG"`;
exports[`finance > 1337 > bic > with branch code 1`] = `"GOEFFIJGXXX"`;

exports[`finance > 1337 > bitcoinAddress 1`] = `"3adhxs2jewAgkYgJi7No6Cn8JZa"`;

Expand Down
4 changes: 3 additions & 1 deletion test/finance.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,9 @@ describe('finance', () => {
const bic = faker.finance.bic();

expect(bic).toBeTypeOf('string');
expect(bic).toMatch(/^[A-Z]{6}[A-Z0-9]{2}$/);
bic.length === 8
? expect(bic).toMatch(/^[A-Z]{6}[A-Z0-9]{2}$/)
: expect(bic).toMatch(/^[A-Z]{6}[A-Z0-9]{2}[A-Z0-9]{3}$/);
expect(ibanLib.iso3166).toContain(bic.substring(4, 6));
});

Expand Down

0 comments on commit 820aca1

Please sign in to comment.