Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
JavaScript Mocking Fundamentals on TestingJavaScript.com
| Date | Stars |
|---|---|
| 2026-07-24 | 304 |
| 2026-07-25 | 304 |
| 2026-07-28 | 304 |
| 2026-07-30 | 304 |
| 2026-08-06 | 304 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<h1 align="center">
<a href="https://testingjavascript.com/courses/javascript-mocking-fundamentals">JavaScript Mocking Fundamentals</a>
</h1>
<div align="center">
<h2><a href="https://testingjavascript.com">TestingJavaScript.com</a></h2>
<a href="https://testingjavascript.com">
<img
width="500"
alt="Learn the smart, efficient way to test any JavaScript application."
src="https://kentcdodds.com/images/testingjavascript-promo/tjs-4.jpg"
/>
</a>
</div>
<hr />
<p align="center" style="font-size: 1.2rem;">
Learn how mocking in JavaScript tests works by implementing them from scratch!
</p>
<hr />
In this material, we have a set of `no-framework` tests that correspond to a set
of jest tests (in the `__tests__` directory). The idea is that (with the
exception of the first test), you look at the jest version first, then see how
that would be implemented without a testing framework.
Order of material:
1. `monkey-patching.js` (no jest version)
2. `mock-fn.js`
3. `spy.js`
4. `inline-module-mock.js`
5. `external-mock-module.js`
The files are intended to test the `thumb-war.js` module and mock the `utils`
module.
To run the tests, run `npx jest`. To start watch mode run `npx jest --watch`
## Custom jest runner.
You can definitely run the `no-framework` files just using `node` (like this:
`node src/no-framework/monkey-patching.js`), but in an effort to make running
these easier, I created a custom jest runner that uses jest to run the files,
but allow them to be run without the jest testing framework. It's really cool.
It uses [`create-jest-runner`](https://www.npmjs.com/package/create-jest-runner)
and should probably be published eventually.
Excerpt of 1,708 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:e22c879524d84f83, topic:testing