diff --git a/src/system.ts b/src/system.ts index c6532ed2a47..c5b052c0a80 100644 --- a/src/system.ts +++ b/src/system.ts @@ -175,10 +175,11 @@ export class System { * Returns a file path. * * @example - * faker.system.filePath() // '/usr/local/src/money.rmp.dotx' + * faker.system.filePath() // '/usr/local/src/money.dotx' */ + // TODO @prisis 2022-01-25: add a parameter to have the possibility to have one or two ext on file. filePath(): string { - return `${this.faker.system.directoryPath()}/${this.faker.system.fileName()}.${this.faker.system.fileExt()}`; + return `${this.directoryPath()}/${this.fileName()}`; } /** diff --git a/test/system.spec.ts b/test/system.spec.ts index b9d36edc31f..e9eee5060ec 100644 --- a/test/system.spec.ts +++ b/test/system.spec.ts @@ -15,8 +15,7 @@ const seededRuns = [ fileType: 'image', fileExt: 'chm', directoryPath: '/opt/bin', - // TODO @prisis 2022-01-25: add a parameter to have the possibility to have one or two ext on file. - filePath: '/opt/bin/directives_savings_computer.qwd.jade', + filePath: '/opt/bin/directives_savings_computer.qwd', semver: '3.7.9', }, }, @@ -31,8 +30,7 @@ const seededRuns = [ fileType: 'font', fileExt: 'gxt', directoryPath: '/Library', - // TODO @prisis 2022-01-25: add a parameter to have the possibility to have one or two ext on file. - filePath: '/Library/bike_kiribati.kpr.ez3', + filePath: '/Library/bike_kiribati.kpr', semver: '2.5.1', }, }, @@ -47,8 +45,7 @@ const seededRuns = [ fileType: 'x-shader', fileExt: 'opml', directoryPath: '/var/log', - // TODO @prisis 2022-01-25: add a parameter to have the possibility to have one or two ext on file. - filePath: '/var/log/forward_frozen.swf.fcdt', + filePath: '/var/log/forward_frozen.swf', semver: '9.4.8', }, }, @@ -104,7 +101,6 @@ describe('system', () => { 'jpeg', 'm2a', 'm2v', - 'm3a', 'mp4', 'mp4v', 'mpeg', @@ -118,7 +114,7 @@ describe('system', () => { expect( extList, `generated common file ext should be one of [${extList.join( - ',' + ', ' )}]. Got "${fileExt}".` ).include(fileExt); });