with-local-tmp-dir

Creates a temporary folder inside cwd, cds inside the folder, runs a function, and removes the folder. Especially useful for testing. (by dword-design)

With-local-tmp-dir Alternatives

Similar projects and alternatives to with-local-tmp-dir

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better with-local-tmp-dir alternative or higher similarity.

with-local-tmp-dir reviews and mentions

Posts with mentions or reviews of with-local-tmp-dir. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-04-21.
  • How to Write File-Based Tests With Real Files
    8 projects | dev.to | 21 Apr 2021
    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.

Stats

Basic with-local-tmp-dir repo stats
1
4
4.9
16 days ago
Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com