Skip to content

feat: fake with multiple parameters#1459

Merged
ST-DDT merged 13 commits intonextfrom
feat/fake-multiple-parameters
Oct 23, 2022
Merged

feat: fake with multiple parameters#1459
ST-DDT merged 13 commits intonextfrom
feat/fake-multiple-parameters

Conversation

@ST-DDT
Copy link
Copy Markdown
Member

@ST-DDT ST-DDT commented Oct 15, 2022

Adds support for method calls with multiple parameters in fake()

Example:

faker.helpers.fake('I rolled the dice and got: {{random.numeric(5, {"bannedDigits": "12345678"})}}')

Result:

I rolled the dice and got: 6

Docs Preview

grafik

@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent s: needs decision Needs team/maintainer decision m: helpers Something is referring to the helpers module labels Oct 15, 2022
@ST-DDT ST-DDT requested review from a team October 15, 2022 21:50
@ST-DDT ST-DDT self-assigned this Oct 15, 2022
@ST-DDT ST-DDT added the s: on hold Blocked by something or frozen to avoid conflicts label Oct 15, 2022
@ST-DDT
Copy link
Copy Markdown
Member Author

ST-DDT commented Oct 15, 2022

Blocked by #1458

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 16, 2022

Codecov Report

Merging #1459 (5e7a86d) into next (f4907a1) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1459   +/-   ##
=======================================
  Coverage   99.63%   99.63%           
=======================================
  Files        2165     2165           
  Lines      237132   237132           
  Branches     1020     1017    -3     
=======================================
  Hits       236266   236266           
  Misses        845      845           
  Partials       21       21           
Impacted Files Coverage Δ
src/modules/helpers/index.ts 98.44% <100.00%> (ø)

Comment thread src/modules/helpers/index.ts Outdated
@ST-DDT ST-DDT requested review from a team and Shinigami92 October 16, 2022 11:41
Comment thread src/modules/helpers/index.ts Outdated
Shinigami92
Shinigami92 previously approved these changes Oct 16, 2022
Shinigami92
Shinigami92 previously approved these changes Oct 16, 2022
@ST-DDT ST-DDT removed the s: on hold Blocked by something or frozen to avoid conflicts label Oct 16, 2022
@Shinigami92 Shinigami92 added s: accepted Accepted feature / Confirmed bug and removed s: needs decision Needs team/maintainer decision labels Oct 16, 2022
Copy link
Copy Markdown
Member

@ejcheng ejcheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please replace all instances of random.numeric with string.numeric to fix tests

@ST-DDT ST-DDT enabled auto-merge (squash) October 23, 2022 18:28
@ST-DDT ST-DDT merged commit 2eb2537 into next Oct 23, 2022
@ST-DDT ST-DDT deleted the feat/fake-multiple-parameters branch October 23, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature m: helpers Something is referring to the helpers module p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants