with-local-tmp-dir
react-native-localhost
Our great sponsors
with-local-tmp-dir | react-native-localhost | |
---|---|---|
1 | 1 | |
4 | 25 | |
- | - | |
4.9 | 0.0 | |
about 2 months ago | about 3 years ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
with-local-tmp-dir
-
How to Write File-Based Tests With Real Files
Why not use real files for testing instead of mocking? I built an NPM package called with-local-tmp-dir that basically creates a temporary subfolder inside cwd, cds into it, runs a function, and cds back to the previous cwd afterwards. In this function you can create files and pretty much anything, run your unit under test. Afterwards the folder is removed and everything is cleaned up. You actually do not solely need to use it for tests, you can use it anywhere, but it's mostly useful for tests.
react-native-localhost
What are some alternatives?
output-files - Output a tree of files and directories by providing an object. Especially useful for testing with real files.
dotenv-flow - Loads environment variables from .env.[development|test|production][.local] files for Node.js® projects.
jest - Delightful JavaScript Testing.
nexrender - 📹 Data-driven render automation for After Effects
mock-fs - Configurable mock for the fs module
hotel - 🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
mocha - ☕️ simple, flexible, fun javascript test framework for node.js & the browser
magento2-address-validation - Magento 2: Extended address validation against webservices
expect - Write better assertions
endent - ⬅️ An ES6 string tag makes indentation better
fs-extra - Node.js: extra methods for the fs object like copy(), remove(), mkdirs()