danibram / mocker-data-generator

A simplified way to generate masive mock data based on a schema, you can use the awesome fake/random data generators like (FakerJs, ChanceJs, CasualJs and RandExpJs)
https://danibram.github.io/mocker-data-generator/
MIT License
426 stars 45 forks source link

Pass back error when schema is invalid #43

Closed bcl-lcb closed 6 years ago

bcl-lcb commented 6 years ago

Hi,

I was thinking about getting the schema error info when the build() is called. So I let the promise pass back the error.

Thanks

codecov-io commented 6 years ago

Codecov Report

Merging #43 into master will decrease coverage by 0.85%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #43      +/-   ##
==========================================
- Coverage   91.16%   90.31%   -0.86%     
==========================================
  Files           5        5              
  Lines         317      320       +3     
  Branches       52       53       +1     
==========================================
  Hits          289      289              
- Misses         12       14       +2     
- Partials       16       17       +1
Impacted Files Coverage Δ
src/lib/Mocker.ts 86.11% <0%> (-7.83%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 68ff964...f2f4369. Read the comment docs.

danibram commented 6 years ago

Thank you for your pull request i will accept it, but i need to modify that to work with the callback style too, i forget that, so i will introduce the changes and release a new version today. thank you!