From fbf2d6ca785e7e8cf851873a1900cdefe31cfb17 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Wed, 11 Jan 2023 00:12:44 +0100 Subject: [PATCH 1/2] test: fix failing tests --- test/fixtures.js | 50 +++++++++++++++++++++--------------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/test/fixtures.js b/test/fixtures.js index 5b62db1..c540fac 100644 --- a/test/fixtures.js +++ b/test/fixtures.js @@ -1,40 +1,34 @@ module.exports = [{ - fakerMethod: 'address', - output: ['country', 'city', 'province'] + fakerMethod: 'address', + output: ['country', 'city', 'province'] },{ - fakerMethod: 'company', - output: ['bsNoun', 'bsBuzz', 'startups'] + fakerMethod: 'company', + output: ['bsNoun', 'bsBuzz', 'startups'] },{ - fakerMethod: 'date', - output: ['past', 'future', 'calendar'] + fakerMethod: 'date', + output: ['past', 'future', 'calendar'] },{ - fakerMethod: 'finance', - output: ['accountName', 'mask', 'investors'] + fakerMethod: 'finance', + output: ['accountName', 'mask', 'investors'] },{ - fakerMethod: 'internet', - output: ['avatar', 'userName', 'protocols'] + fakerMethod: 'internet', + output: ['avatar', 'userName', 'protocols'] },{ - fakerMethod: 'name', - output: ['firstName', 'prefix', 'surname'] + fakerMethod: 'name', + output: ['firstName', 'prefix', 'surname'] },{ - fakerMethod: 'phone', - output: ['phoneNumber', 'phoneNumberFormat', 'emergency'] + fakerMethod: 'phone', + output: ['phoneNumber', 'phoneNumberFormat', 'emergency'] },{ - fakerMethod: 'random', - output: ['uuid', 'word', 'checks'] + fakerMethod: 'random', + output: ['alpha', 'word', 'checks'] },{ - fakerMethod: 'hacker', - output: ['noun', 'phrase', 'exploits'] + fakerMethod: 'hacker', + output: ['noun', 'phrase', 'exploits'] },{ - fakerMethod: 'helpers', - output: ['userCard', 'createTransaction', 'halp'] + fakerMethod: 'image', + output: ['avatar', 'sports', 'filter'] },{ - fakerMethod: 'helpers', - output: ['userCard', 'createTransaction', 'halp'] -},{ - fakerMethod: 'image', - output: ['avatar', 'sports', 'filter'] -},{ - fakerMethod: 'lorem', - output: ['words', 'sentence', 'ipsum'] + fakerMethod: 'lorem', + output: ['words', 'sentence', 'ipsum'] }]; From 951bbd5f0e0c1b574883fe92689e00cf09cc1460 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Wed, 11 Jan 2023 00:25:25 +0100 Subject: [PATCH 2/2] test: add cases for untested modules --- test/fixtures.js | 120 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 86 insertions(+), 34 deletions(-) diff --git a/test/fixtures.js b/test/fixtures.js index c540fac..0319f0f 100644 --- a/test/fixtures.js +++ b/test/fixtures.js @@ -1,34 +1,86 @@ -module.exports = [{ - fakerMethod: 'address', - output: ['country', 'city', 'province'] -},{ - fakerMethod: 'company', - output: ['bsNoun', 'bsBuzz', 'startups'] -},{ - fakerMethod: 'date', - output: ['past', 'future', 'calendar'] -},{ - fakerMethod: 'finance', - output: ['accountName', 'mask', 'investors'] -},{ - fakerMethod: 'internet', - output: ['avatar', 'userName', 'protocols'] -},{ - fakerMethod: 'name', - output: ['firstName', 'prefix', 'surname'] -},{ - fakerMethod: 'phone', - output: ['phoneNumber', 'phoneNumberFormat', 'emergency'] -},{ - fakerMethod: 'random', - output: ['alpha', 'word', 'checks'] -},{ - fakerMethod: 'hacker', - output: ['noun', 'phrase', 'exploits'] -},{ - fakerMethod: 'image', - output: ['avatar', 'sports', 'filter'] -},{ - fakerMethod: 'lorem', - output: ['words', 'sentence', 'ipsum'] -}]; +module.exports = [ + { + fakerMethod: 'address', + output: ['country', 'city', 'province'] + }, + { + fakerMethod: 'animal', + output: ['bear', 'fish', 'butterfly'] + }, + { + fakerMethod: 'color', + output: ['human', 'rgb', 'blue'] + }, + { + fakerMethod: 'commerce', + output: ['department', 'productName', 'employee'] + }, + { + fakerMethod: 'company', + output: ['bsNoun', 'bsBuzz', 'startups'] + }, + { + fakerMethod: 'database', + output: ['column', 'engine', 'structure'] + }, + { + fakerMethod: 'datatype', + output: ['string', 'uuid', 'binary'] + }, + { + fakerMethod: 'date', + output: ['past', 'future', 'calendar'] + }, + { + fakerMethod: 'finance', + output: ['accountName', 'mask', 'investors'] + }, + { + fakerMethod: 'git', + output: ['commitMessage', 'shortSha', 'tag'] + }, + { + fakerMethod: 'hacker', + output: ['noun', 'phrase', 'exploits'] + }, + { + fakerMethod: 'image', + output: ['avatar', 'sports', 'filter'] + }, + { + fakerMethod: 'internet', + output: ['avatar', 'userName', 'protocols'] + }, + { + fakerMethod: 'lorem', + output: ['words', 'sentence', 'ipsum'] + }, + { + fakerMethod: 'music', + output: ['genre', 'songName', 'lyrics'] + }, + { + fakerMethod: 'name', + output: ['firstName', 'prefix', 'surname'] + }, + { + fakerMethod: 'phone', + output: ['phoneNumber', 'phoneNumberFormat', 'emergency'] + }, + { + fakerMethod: 'random', + output: ['alpha', 'word', 'checks'] + }, + { + fakerMethod: 'system', + output: ['fileName', 'semver', 'clock'] + }, + { + fakerMethod: 'vehicle', + output: ['bicycle', 'model', 'transporter'] + }, + { + fakerMethod: 'word', + output: ['conjunction', 'noun', 'count'] + }, +];