Skip to content

Commit

Permalink
Merge branch 'next' into fix/rm-fictional-cities-ne-ro-tr
Browse files Browse the repository at this point in the history
  • Loading branch information
xDivisionByZerox authored May 3, 2023
2 parents 9c4af9a + ede6ffa commit 99d4f5c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions test/helpers.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,8 @@ describe('helpers', () => {
});

it('empty array returns empty array', () => {
const input = [];
const length = faker.number.int({ min: 1, max: 6 });
const unique = faker.helpers.uniqueArray(input, length);
const unique = faker.helpers.uniqueArray([], length);
expect(unique).toHaveLength(0);
});

Expand Down
8 changes: 4 additions & 4 deletions test/scripts/apidoc/signature.example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class SignatureTest {
* @param b The string parameter.
*/
optionalStringParamMethod(b?: string): number {
return +b;
return b ? 0 : 1;
}

/**
Expand All @@ -114,7 +114,7 @@ export class SignatureTest {
* @param c The boolean parameter.
*/
multiParamMethod(a: number, b?: string, c: boolean = true): number {
return c ? a : +b;
return c ? a : b ? 0 : 1;
}

/**
Expand Down Expand Up @@ -143,7 +143,7 @@ export class SignatureTest {
excludes?: ReadonlyArray<AlphaNumericChar>;
}
): string {
return value + options.format;
return options?.format ?? value;
}

/**
Expand Down Expand Up @@ -195,7 +195,7 @@ export class SignatureTest {
*/
e: LiteralUnion<'a' | 'b'>;
}): number {
return options.c ? options.a : +options.b;
return options.a;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion test/support/seededRuns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type NoArgsMethodOf<ObjectType> = MethodOf<ObjectType> &
{
[Key in MethodOf<ObjectType, () => unknown>]: ObjectType[Key] extends (
arg0: string | number | boolean | Record<string, undefined>,
...args
...args: unknown[]
) => unknown
? Key
: never;
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default defineConfig({
setupFiles: ['test/setup.ts'],
coverage: {
all: true,
provider: 'c8',
reporter: ['clover', 'cobertura', 'lcov', 'text'],
include: ['src'],
},
Expand Down

0 comments on commit 99d4f5c

Please sign in to comment.