Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(parser): add mock generator and remove analyzer #107

Merged
merged 6 commits into from
Sep 11, 2021

Conversation

omermorad
Copy link
Owner

Add MockGenerator
Remove ClassAnalyzer moving all the logics into ClassParser

BREAKING CHANGE: ClassAnalayzer has been removed and all the logic has been moved to ClassParser

Add MockGenerator
Remove ClassAnalyzer moving all the logics into ClassParser

BREAKING CHANGE: ClassAnalayzer has been removed and all the logic has been moved to ClassParser
Remove mock generator from mockingbird-ts and import it from @mockinbird/parser instead
mock generator acts as a singleton now
@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2021

Codecov Report

Merging #107 (64acb40) into release (b4d51ff) will decrease coverage by 3.37%.
The diff coverage is 98.36%.

Impacted file tree graph

@@             Coverage Diff             @@
##           release     #107      +/-   ##
===========================================
- Coverage    97.27%   93.90%   -3.38%     
===========================================
  Files           18       17       -1     
  Lines          294      279      -15     
  Branches        43       42       -1     
===========================================
- Hits           286      262      -24     
- Misses           6       12       +6     
- Partials         2        5       +3     
Impacted Files Coverage Δ
.../parser/src/lib/handlers/callback-value-handler.ts 100.00% <ø> (ø)
...ages/parser/src/lib/handlers/enum-value-handler.ts 100.00% <ø> (ø)
...r/src/lib/handlers/object-literal-value-handler.ts 100.00% <ø> (ø)
...kages/parser/src/lib/handlers/primitive-handler.ts 100.00% <ø> (ø)
...parser/src/lib/handlers/primitive-value-handler.ts 100.00% <ø> (ø)
...ges/parser/src/lib/handlers/regex-value-handler.ts 100.00% <ø> (ø)
...ackages/parser/src/lib/generator/mock-generator.ts 61.53% <80.00%> (ø)
...ckages/mockingbird/src/lib/builder/mock-builder.ts 100.00% <100.00%> (ø)
...kages/mockingbird/src/lib/builder/mock-producer.ts 71.42% <100.00%> (-1.91%) ⬇️
...ckages/mockingbird/src/lib/factory/mock-factory.ts 100.00% <100.00%> (ø)
... and 4 more

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 b4d51ff...64acb40. Read the comment docs.

@omermorad omermorad merged commit 32c0ff6 into release Sep 11, 2021
@omermorad omermorad deleted the refactor/split-generator-package branch September 11, 2021 17:24
omermorad added a commit that referenced this pull request Dec 8, 2021
* refactor(parser): refactor handlers to work with ioc (di) (#96)

Add TypeDI to enable working with IoC to enable convenient DI

* feat(parser): add regex functionality/handler (#98)

Add 'randexp' to enable generating a random string that matches a given RegExp

* fix(parser): fix import and handler priority of regex + randexp

* feat(reflect): add regex to mock decorator value options

Add 'randexp' to enable generating a random string that matches a given RegExp

* test(mockingbird-ts): check mock generation with regex

* test(mockingbird-ts): update snapshot of mock generator

* fix(parser): fix import and handler priority of regex + randexp

* feat(reflect): add regex to mock decorator value options

Add 'randexp' to enable generating a random string that matches a given RegExp

* test(mockingbird-ts): check mock generation with regex

* test(mockingbird-ts): update snapshot of mock generator

* feat(common): add regex constructor to exact value

Add RegExp to be part of the possible values in the mock decorator (exact value)

* style(reflect): add method signature for regex

Add method signature for RegExp value

* test(mockingbird-ts): check mock generation with regex

* test(mockingbird-ts): update snapshot of mock generator

* feat(logger): add initial working module (#104)

* feat(logger): add initial working module

Add basic logger module

* chore(logger): add eslint files

* chore(logger): add lint scripts

* feat(fixtures): add basic fixtures (and snapshots) functionality  (#105)

* feat(fixtures): add basic fixtures module, skeleton and basic logic

* refactor(fixtures): improve logic, change types/interfaces, add ioc typedi

* refactor(fixtures): redesign classes and rearrange files, improve error texts

* style(fixtures): functions name changes + adding deps

* chore: rearrange dependencies and modules exported files (#106)

* refactor(parser): add mock generator and remove analyzer (#107)

* refactor(parser): add mock generator and remove analyzer

Add MockGenerator
Remove ClassAnalyzer moving all the logics into ClassParser

BREAKING CHANGE: ClassAnalayzer has been removed and all the logic has been moved to ClassParser

* test(parser): add (move) mock generator integration test

* chore(parser): config jest and typescript to run integration test

* fix(mockingbird-ts): use mock generator differently (singleton)

Remove mock generator from mockingbird-ts and import it from @mockinbird/parser instead
mock generator acts as a singleton now

* refactor(mockingbird-ts): fix mock factory

* chore(mockingbird-ts): config jest to collect coverage properly

* revert: revert commit 3bcde46 fixtures package

* chore: update yarn lock dependencies (#110)

* chore: update codecov coverarge target to 90% (#111)

* chore(packages): version packages [skip ci]

 - @mockinbird/common@2.0.3-rc.0
 - @mockinbird/logger@0.0.1-rc.0
 - mockingbird-ts@2.1.2-rc.0
 - @mockinbird/parser@3.0.2-rc.0
 - @mockinbird/reflect@3.0.2-rc.0

* chore: release packages (with new name yayy)

* chore: changes package names scope

* chore: change mockinbird to mockingbird namespace scope (#116)

* chore: change mockinbird to mockingbird namespace scope

* refactor: change from mockingbird-ts to mockingbird in test-classes

* chore: update manypkg and fix versions (#117)

* chore(packages): version packages [skip ci]

 - @mockingbird/common@2.0.3-rc.1
 - @mockingbird/logger@0.0.1-rc.1
 - mockingbird@2.1.2-rc.2
 - @mockingbird/parser@3.0.2-rc.1
 - @mockingbird/reflect@3.0.2-rc.1

* chore: fix sample to work with the new package (#118)

* chore: remove mockingbird-ts strings (#119)

* chore: replace everything from mockingbird-ts to mockingbird

* chore: replace everything from mockingbird-ts to mockingbird #2

* chore(sample): replace sample version

* chore(packages): version packages [skip ci]

 - @mockingbird/common@2.0.3-rc.2
 - mockingbird@2.1.2-rc.3
 - @mockingbird/parser@3.0.2-rc.2
 - @mockingbird/reflect@3.0.2-rc.2

* chore(packages): version packages [skip ci]

 - @mockingbird/common@2.0.3-rc.3
 - mockingbird@2.1.2-rc.4
 - @mockingbird/parser@3.0.2-rc.3
 - @mockingbird/reflect@3.0.2-rc.3

* chore(packages): version packages [skip ci]

 - @mockingbird/common@2.0.3
 - @mockingbird/logger@0.0.1
 - mockingbird@2.1.2
 - @mockingbird/parser@3.0.2
 - @mockingbird/reflect@3.0.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants