aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-04-17 10:20:18 +0200
committerGitHub <[email protected]>2023-04-17 08:20:18 +0000
commit4df3de6e3ed88142fc6c2f76e61605be0da1ba5d (patch)
tree2c0ed1aaa1f8f7a043adcc1891b8f5b20378cc42 /test
parent62b1aed46b108b08b25fcedf8d2606870cffb233 (diff)
downloadfaker-4df3de6e3ed88142fc6c2f76e61605be0da1ba5d.tar.xz
faker-4df3de6e3ed88142fc6c2f76e61605be0da1ba5d.zip
chore(location): standardize abbreviated parameter (#2061)
Diffstat (limited to 'test')
-rw-r--r--test/__snapshots__/location.spec.ts.snap36
-rw-r--r--test/location.spec.ts20
2 files changed, 28 insertions, 28 deletions
diff --git a/test/__snapshots__/location.spec.ts.snap b/test/__snapshots__/location.spec.ts.snap
index 1d09415c..f41c9f70 100644
--- a/test/__snapshots__/location.spec.ts.snap
+++ b/test/__snapshots__/location.spec.ts.snap
@@ -4,9 +4,9 @@ exports[`location > 42 > buildingNumber 1`] = `"7917"`;
exports[`location > 42 > cardinalDirection > noArgs 1`] = `"East"`;
-exports[`location > 42 > cardinalDirection > with boolean 1`] = `"East"`;
+exports[`location > 42 > cardinalDirection > with abbreviated option 1`] = `"E"`;
-exports[`location > 42 > cardinalDirection > with useAbbr option 1`] = `"E"`;
+exports[`location > 42 > cardinalDirection > with boolean 1`] = `"East"`;
exports[`location > 42 > city 1`] = `"Port Valentine"`;
@@ -24,9 +24,9 @@ exports[`location > 42 > county 1`] = `"Berkshire"`;
exports[`location > 42 > direction > noArgs 1`] = `"South"`;
-exports[`location > 42 > direction > with boolean 1`] = `"South"`;
+exports[`location > 42 > direction > with abbreviated option 1`] = `"S"`;
-exports[`location > 42 > direction > with useAbbr option 1`] = `"S"`;
+exports[`location > 42 > direction > with boolean 1`] = `"South"`;
exports[`location > 42 > latitude > noArgs 1`] = `-22.5828`;
@@ -122,9 +122,9 @@ exports[`location > 42 > nearbyGPSCoordinate > with radius and isMetric 1`] = `
exports[`location > 42 > ordinalDirection > noArgs 1`] = `"Northwest"`;
-exports[`location > 42 > ordinalDirection > with boolean 1`] = `"Northwest"`;
+exports[`location > 42 > ordinalDirection > with abbreviated option 1`] = `"NW"`;
-exports[`location > 42 > ordinalDirection > with useAbbr option 1`] = `"NW"`;
+exports[`location > 42 > ordinalDirection > with boolean 1`] = `"Northwest"`;
exports[`location > 42 > secondaryAddress 1`] = `"Apt. 791"`;
@@ -156,9 +156,9 @@ exports[`location > 1211 > buildingNumber 1`] = `"487"`;
exports[`location > 1211 > cardinalDirection > noArgs 1`] = `"West"`;
-exports[`location > 1211 > cardinalDirection > with boolean 1`] = `"West"`;
+exports[`location > 1211 > cardinalDirection > with abbreviated option 1`] = `"W"`;
-exports[`location > 1211 > cardinalDirection > with useAbbr option 1`] = `"W"`;
+exports[`location > 1211 > cardinalDirection > with boolean 1`] = `"West"`;
exports[`location > 1211 > city 1`] = `"La Crosse"`;
@@ -176,9 +176,9 @@ exports[`location > 1211 > county 1`] = `"Cambridgeshire"`;
exports[`location > 1211 > direction > noArgs 1`] = `"Southwest"`;
-exports[`location > 1211 > direction > with boolean 1`] = `"Southwest"`;
+exports[`location > 1211 > direction > with abbreviated option 1`] = `"SW"`;
-exports[`location > 1211 > direction > with useAbbr option 1`] = `"SW"`;
+exports[`location > 1211 > direction > with boolean 1`] = `"Southwest"`;
exports[`location > 1211 > latitude > noArgs 1`] = `77.1337`;
@@ -274,9 +274,9 @@ exports[`location > 1211 > nearbyGPSCoordinate > with radius and isMetric 1`] =
exports[`location > 1211 > ordinalDirection > noArgs 1`] = `"Southwest"`;
-exports[`location > 1211 > ordinalDirection > with boolean 1`] = `"Southwest"`;
+exports[`location > 1211 > ordinalDirection > with abbreviated option 1`] = `"SW"`;
-exports[`location > 1211 > ordinalDirection > with useAbbr option 1`] = `"SW"`;
+exports[`location > 1211 > ordinalDirection > with boolean 1`] = `"Southwest"`;
exports[`location > 1211 > secondaryAddress 1`] = `"Suite 487"`;
@@ -308,9 +308,9 @@ exports[`location > 1337 > buildingNumber 1`] = `"51225"`;
exports[`location > 1337 > cardinalDirection > noArgs 1`] = `"East"`;
-exports[`location > 1337 > cardinalDirection > with boolean 1`] = `"East"`;
+exports[`location > 1337 > cardinalDirection > with abbreviated option 1`] = `"E"`;
-exports[`location > 1337 > cardinalDirection > with useAbbr option 1`] = `"E"`;
+exports[`location > 1337 > cardinalDirection > with boolean 1`] = `"East"`;
exports[`location > 1337 > city 1`] = `"New Carmella"`;
@@ -328,9 +328,9 @@ exports[`location > 1337 > county 1`] = `"Bedfordshire"`;
exports[`location > 1337 > direction > noArgs 1`] = `"South"`;
-exports[`location > 1337 > direction > with boolean 1`] = `"South"`;
+exports[`location > 1337 > direction > with abbreviated option 1`] = `"S"`;
-exports[`location > 1337 > direction > with useAbbr option 1`] = `"S"`;
+exports[`location > 1337 > direction > with boolean 1`] = `"South"`;
exports[`location > 1337 > latitude > noArgs 1`] = `-42.8356`;
@@ -426,9 +426,9 @@ exports[`location > 1337 > nearbyGPSCoordinate > with radius and isMetric 1`] =
exports[`location > 1337 > ordinalDirection > noArgs 1`] = `"Northwest"`;
-exports[`location > 1337 > ordinalDirection > with boolean 1`] = `"Northwest"`;
+exports[`location > 1337 > ordinalDirection > with abbreviated option 1`] = `"NW"`;
-exports[`location > 1337 > ordinalDirection > with useAbbr option 1`] = `"NW"`;
+exports[`location > 1337 > ordinalDirection > with boolean 1`] = `"Northwest"`;
exports[`location > 1337 > secondaryAddress 1`] = `"Apt. 512"`;
diff --git a/test/location.spec.ts b/test/location.spec.ts
index 69af0a6d..1835ab43 100644
--- a/test/location.spec.ts
+++ b/test/location.spec.ts
@@ -107,7 +107,7 @@ describe('location', () => {
)((t) => {
t.it('noArgs')
.it('with boolean', false)
- .it('with useAbbr option', { useAbbr: true });
+ .it('with abbreviated option', { abbreviated: true });
});
t.describe('zipCode', (t) => {
@@ -275,11 +275,11 @@ describe('location', () => {
});
describe('direction()', () => {
- it('returns abbreviation when useAbbr is true', () => {
- const direction = faker.location.direction({ useAbbr: true });
+ it('returns abbreviation when abbreviated is true', () => {
+ const direction = faker.location.direction({ abbreviated: true });
const lengthDirection = direction.length;
const prefixErrorMessage =
- 'The abbreviation of direction when useAbbr is true should';
+ 'The abbreviation of direction when abbreviated is true should';
expect(
direction,
@@ -290,14 +290,14 @@ describe('location', () => {
});
describe('ordinalDirection()', () => {
- it('returns abbreviation when useAbbr is true', () => {
+ it('returns abbreviation when abbreviated is true', () => {
const ordinalDirection = faker.location.ordinalDirection({
- useAbbr: true,
+ abbreviated: true,
});
const expectedType = 'string';
const ordinalDirectionLength = ordinalDirection.length;
const prefixErrorMessage =
- 'The ordinal direction when useAbbr is true should';
+ 'The ordinal direction when abbreviated is true should';
expect(
ordinalDirection,
@@ -308,14 +308,14 @@ describe('location', () => {
});
describe('cardinalDirection()', () => {
- it('returns abbreviation when useAbbr is true', () => {
+ it('returns abbreviation when abbreviated is true', () => {
const cardinalDirection = faker.location.cardinalDirection({
- useAbbr: true,
+ abbreviated: true,
});
const expectedType = 'string';
const cardinalDirectionLength = cardinalDirection.length;
const prefixErrorMessage =
- 'The cardinal direction when useAbbr is true should';
+ 'The cardinal direction when abbreviated is true should';
expect(
cardinalDirection,