-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Faker.ts initial #6
Conversation
…nitial-package
Co-authored-by: Idanpt <idan.ptichi@naturalint.com>
…to 3 different for objects
* test(fixture-factory, class-processor): first commit of unit tests - fixture-factory,class-processor * test(class-processor, primitive-value-handler): class processor, primitive values tests added * test: refactored tests Co-authored-by: amit.wagner <wagner.amit@gmail.com>
* refactor: naming * refactor(FML): mega refactor * refactor(handlers): logics and more handlers * fix(primitives): throw an error when type mismatch * fix(circularity): remove ciruclarity protection because reflect-metadata protection * test(handlers): added unit test for callback handler * test(handlers): add enum unit test and fix callback one * test(handlers): add some more tests for handlers * refactor(naming): changed some names * test: more coverage and renaming * chore(release-settings): change startegy to work with v-* and not with master * test(reflector): add class reflector test coverage * test: added integration test, increased coverage
|
||
const { count, type } = value; | ||
|
||
if (PrimitiveHandlerAbstract.PRIMITIVES.includes(type.name)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is wired.
why do we have primitive handling in MultiClassValueHandler ?
if (typeof value !== 'undefined') { | ||
if (MultiClassValueHandler.isTypeValue(propertyDto as PropertyDto<MultiClass>)) { | ||
throw new Error( | ||
'Type mismatch. Properties decorated with @Fixture({ type: ClassType }) must be typed as array (e.g. prop: string[])' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this error belong to PrimitiveValueHandler? why do we have ClassType here?
Codecov Report
@@ Coverage Diff @@
## master #6 +/- ##
==========================================
Coverage ? 100.00%
==========================================
Files ? 13
Lines ? 206
Branches ? 24
==========================================
Hits ? 206
Misses ? 0
Partials ? 0 Continue to review full report at Codecov.
|
* refactor: renames and add second phase todos * fix: add 'unknown' overlap to property dto Co-authored-by: Idanpt <idan.ptichi@naturalint.com> Co-authored-by: Omer Morad <omer.moradd@gmail.com>
Co-authored-by: Idanpt <idan.ptichi@naturalint.com>
# 1.0.0-alpha.1 (2021-02-01) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Features * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * changelog ([a62d9c8](a62d9c8)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8)
# 1.0.0-beta.1 (2021-02-03) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Code Refactoring * **names:** change the whole project from 'fixture' into 'mock' ([3b1ba31](3b1ba31)) ### Features * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * changelog ([a62d9c8](a62d9c8)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **names:** Fixture is now Mock
# 1.0.0-beta.1 (2021-02-04) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Code Refactoring * **names:** change the whole project from 'fixture' into 'mock' ([3b1ba31](3b1ba31)) ### Features * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * changelog ([a62d9c8](a62d9c8)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **names:** Fixture is now Mock
🎉 This PR is included in version 1.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# 1.0.0-beta.1 (2021-02-05) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Continuous Integration * **release:** add beta as pre-release branch ([aed0c09](aed0c09)) ### Features * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **release:** Add 'tslib' as dependency
# 1.0.0-beta.1 (2021-02-05) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Continuous Integration * **release:** add beta as pre-release branch ([aed0c09](aed0c09)) ### Features * **release:** release new beta version ([bda5aa7](bda5aa7)) * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **release:** Add 'tslib' as dependency
# 1.0.0-rc.1 (2021-02-05) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Continuous Integration * **release:** add beta as pre-release branch ([aed0c09](aed0c09)) ### Features * **release:** release new beta version ([bda5aa7](bda5aa7)) * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **release:** Add 'tslib' as dependency
🎉 This PR is included in version 1.0.0-rc.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# 1.0.0-beta.1 (2021-02-09) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Code Refactoring * **types:** add some new types to be more accurate ([d4eba88](d4eba88)) ### Continuous Integration * **release:** add beta as pre-release branch ([aed0c09](aed0c09)) ### Features * **release:** release new beta version ([bda5aa7](bda5aa7)) * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **types:** New MockedClass type * **release:** Add 'tslib' as dependency
# 1.0.0 (2021-02-09) ### Bug Fixes * **signatures:** remove redundant signature for Date type overload ([e4fbbc1](e4fbbc1)) ### Code Refactoring * **types:** add some new types to be more accurate ([d4eba88](d4eba88)) ### Continuous Integration * **release:** add beta as pre-release branch ([aed0c09](aed0c09)) ### Features * **release:** release new beta version ([bda5aa7](bda5aa7)) * alpha release ([#12](#12)) ([5682bb4](5682bb4)) * faker.ts initial ([#6](#6)) ([714fc05](714fc05)), closes [#4](#4) [#7](#7) [#8](#8) ### BREAKING CHANGES * **types:** New MockedClass type * **release:** Add 'tslib' as dependency
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This is the very first code of the project