Skip to content

Commit

Permalink
Update regex
Browse files Browse the repository at this point in the history
  • Loading branch information
pladreyt committed Jan 3, 2023
1 parent 1b94d0d commit ab67163
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/string.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ describe('string', () => {
describe(`binary`, () => {
it('generates a single binary character when no additional argument was provided', () => {
const binary = faker.string.binary();
expect(binary).toMatch(/^0x[01]*$/i);
expect(binary).toMatch(/^0x[01]$/i);
expect(binary).toHaveLength(3);
});

Expand Down Expand Up @@ -408,7 +408,7 @@ describe('string', () => {
describe(`octal`, () => {
it('generates single octal character when no additional argument was provided', () => {
const octal = faker.string.octal();
expect(octal).toMatch(/^0x[0-7]*$/i);
expect(octal).toMatch(/^0x[0-7]$/i);
expect(octal).toHaveLength(3);
});

Expand Down

0 comments on commit ab67163

Please sign in to comment.