aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-12-04 08:31:47 +0100
committerGitHub <[email protected]>2024-12-04 07:31:47 +0000
commit2ba5edb1f37c357d992f8d1bd3febf02f68fbbdd (patch)
tree5376ddc9fd3bfee10f441314787e853e2ba5467c /test
parent1bfa1fa144d58011ce71655c2409663b7114f6a3 (diff)
downloadfaker-2ba5edb1f37c357d992f8d1bd3febf02f68fbbdd.tar.xz
faker-2ba5edb1f37c357d992f8d1bd3febf02f68fbbdd.zip
chore: improve variable naming of system module (#3315)
* chore: improve variable naming of system module * chore: rename variables in tests
Diffstat (limited to 'test')
-rw-r--r--test/modules/system.spec.ts30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/modules/system.spec.ts b/test/modules/system.spec.ts
index 876fb3c6..1e3ff79b 100644
--- a/test/modules/system.spec.ts
+++ b/test/modules/system.spec.ts
@@ -66,8 +66,8 @@ describe('system', () => {
() => {
describe('commonFileExt()', () => {
it('should return common file types', () => {
- const fileExt = faker.system.commonFileExt();
- const extList = [
+ const actual = faker.system.commonFileExt();
+ const extensions = [
'gif',
'htm',
'html',
@@ -96,11 +96,11 @@ describe('system', () => {
];
expect(
- extList,
- `generated common file ext should be one of [${extList.join(
+ extensions,
+ `generated common file ext should be one of [${extensions.join(
', '
- )}]. Got "${fileExt}".`
- ).include(fileExt);
+ )}]. Got "${actual}".`
+ ).include(actual);
});
});
@@ -164,15 +164,15 @@ describe('system', () => {
describe('fileExt()', () => {
it('should return file ext', () => {
- const fileExt = faker.system.fileExt();
+ const actual = faker.system.fileExt();
- expect(fileExt).toBeTypeOf('string');
- expect(fileExt).not.toBe('');
+ expect(actual).toBeTypeOf('string');
+ expect(actual).not.toBe('');
});
it('should return file ext based on mimeType', () => {
- const fileExt = faker.system.fileExt('text/plain');
- const extList = [
+ const actual = faker.system.fileExt('text/plain');
+ const extensions = [
'txt',
'text',
'conf',
@@ -184,11 +184,11 @@ describe('system', () => {
];
expect(
- extList,
- `generated common file ext should be one of [${extList.join(
+ extensions,
+ `generated common file ext should be one of [${extensions.join(
','
- )}]. Got "${fileExt}".`
- ).include(fileExt);
+ )}]. Got "${actual}".`
+ ).include(actual);
});
});