From 2ba5edb1f37c357d992f8d1bd3febf02f68fbbdd Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Wed, 4 Dec 2024 08:31:47 +0100 Subject: chore: improve variable naming of system module (#3315) * chore: improve variable naming of system module * chore: rename variables in tests --- test/modules/system.spec.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'test/modules') 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); }); }); -- cgit v1.2.3