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

Augmentation of mocking function type #1335

Merged
merged 17 commits into from
Nov 25, 2023
Merged

Augmentation of mocking function type #1335

merged 17 commits into from
Nov 25, 2023

Conversation

RobinTail
Copy link
Owner

@RobinTail RobinTail commented Nov 24, 2023

  • alternative loading of testing framework peer;
  • featuring the support of even more testing frameworks

@RobinTail RobinTail added enhancement New feature or request refactoring The better way to achieve the same result breaking Backward incompatible changes labels Nov 24, 2023
@RobinTail RobinTail added this to the v15 milestone Nov 24, 2023
@RobinTail RobinTail mentioned this pull request Nov 24, 2023
@RobinTail RobinTail marked this pull request as ready for review November 24, 2023 22:19
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

I like this solution

@RobinTail
Copy link
Owner Author

RobinTail commented Nov 24, 2023

await import does not work well in jest with ts-jest, or without an advanced loader

You need to run with a version of node that supports ES Modules in the VM API. See https://jestjs.io/docs/ecmascript-modules

See also evanw/esbuild#2651

@RobinTail
Copy link
Owner Author

This worked well for jest

@RobinTail
Copy link
Owner Author

vitest also works good

@RobinTail RobinTail changed the title Experiment: Augmentation of mocking function type Augmentation of mocking function type Nov 25, 2023
src/common-helpers.ts Outdated Show resolved Hide resolved
@RobinTail RobinTail force-pushed the aug-tesing-mock branch 2 times, most recently from cc69c9d to c2561f4 Compare November 25, 2023 14:20
Copy link
Owner Author

@RobinTail RobinTail left a comment

Choose a reason for hiding this comment

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

Now I like it. QAed locally via file:// reference

@RobinTail
Copy link
Owner Author

✅ beta4 QA passed with both jest and vitest

@RobinTail RobinTail merged commit 13b253f into prepare-v15 Nov 25, 2023
@RobinTail RobinTail deleted the aug-tesing-mock branch November 25, 2023 14:45
RobinTail added a commit that referenced this pull request Dec 2, 2023
### The dedication


![image](https://github.com/RobinTail/express-zod-api/assets/13189514/49831267-e98b-4e17-a961-edfe312224cf)

Vika was 24 years young transgender woman when her boyfriend (a
policeman, by the way) murdered her. Moreover, in order to confuse the
tracks and create the impression that the murdered woman was alive, the
policeman cut off her finger, unlocked her mobile phone and sent
messages to her friends. On the evening of October 13, 2020, he was
detained, confessed and showed where he buried the girl’s body.

https://ngs.ru/text/criminal/2022/09/29/71695301/

Transgender women suffer too frequently from transphobic violence and
cruelty, being the less protected social group. I'd like to raise an
awareness of this problem. Humans should be creators — not killers.
Protect transgender women.

Find out more about Vika's story from her interview:
https://ngs.ru/text/relations/2019/06/25/66137377/

----------------------

### Version 15

... description coming soon ...

- #1255 
- #1280 
- #1314 
- #1335 
  - supporting any testing framework having function mocking method 
- #1343 
- #1342 
- #1347
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Backward incompatible changes enhancement New feature or request refactoring The better way to achieve the same result
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant