Skip to content

Commit

Permalink
fix(sampler): fix formatting
Browse files Browse the repository at this point in the history
closes #246
  • Loading branch information
ostridm committed Aug 9, 2024
1 parent c610687 commit f7b7513
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion packages/openapi-sampler/src/samplers/StringSampler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export class StringSampler implements Sampler {
}

private sampleInfiniteQuantifier(randExp: RandExp, max: number): string {

randExp.randInt = (a, b) => Math.floor((a + b) / 2);

for (let i = 1, lmax = max; lmax > 0; lmax = Math.floor(max / ++i)) {
Expand Down
3 changes: 1 addition & 2 deletions packages/openapi-sampler/tests/string.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { sample } from '../src';


describe('StringSampler', () => {
[
{
Expand All @@ -11,7 +10,7 @@ describe('StringSampler', () => {
pattern: '^[A-Za-z0-9._%-]+@(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{1,4}$',
type: 'string'
},
expected: "[email protected]"
expected: '[email protected]'
},
{
input: {
Expand Down

0 comments on commit f7b7513

Please sign in to comment.