Skip to content

Commit

Permalink
Merge branch 'next' into docs/location/change-city-wording
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT authored May 3, 2023
2 parents 7c7e305 + ede6ffa commit ba12d91
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 36 deletions.
File renamed without changes.
7 changes: 1 addition & 6 deletions src/locales/el/location/city_pattern.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
export default [
'{{location.city_prefix}} {{person.firstName}}{{location.city_suffix}}',
'{{location.city_prefix}} {{person.firstName}}',
'{{person.firstName}}{{location.city_suffix}}',
'{{person.lastName}}{{location.city_suffix}}',
];
export default ['{{location.city_name}}'];
4 changes: 2 additions & 2 deletions src/locales/el/location/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* Run 'pnpm run generate:locales' to update.
*/
import type { LocationDefinition } from '../../..';
import city_name from './city_name';
import city_pattern from './city_pattern';
import county from './county';
import default_country from './default_country';
import street_pattern from './street_pattern';

const location: LocationDefinition = {
city_name,
city_pattern,
county,
default_country,
street_pattern,
};
Expand Down
2 changes: 1 addition & 1 deletion src/locales/sk/location/city_prefix.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['North', 'East', 'West', 'South', 'New', 'Lake', 'Port'];
export default null;
21 changes: 1 addition & 20 deletions src/locales/sk/location/city_suffix.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1 @@
export default [
'town',
'ton',
'land',
'ville',
'berg',
'burgh',
'borough',
'bury',
'view',
'port',
'mouth',
'stad',
'furt',
'chester',
'fort',
'haven',
'side',
'shire',
];
export default null;
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 ba12d91

Please sign in to comment.