# freshload

> Require a module without caching.

Latest version **0.2.0** (published 2017-10-28) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install freshload
pnpm add freshload
yarn add freshload
bun add freshload
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2017-10-28 |
| First published | 2017-10-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 7.6.0 |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | cyberwombat |
| Maintainers | cyberwombat |
| Keywords | require, testing, unit, e2e |

## Links

- npm: https://www.npmjs.com/package/freshload
- Repository: https://github.com/cyberwombat/freshload
- Issues: https://github.com/cyberwombat/freshload/issues
- npm.io page: https://npm.io/package/freshload

## Dependencies (2)

- [caller-path](https://npm.io/package/caller-path.md) ^2.0.0
- [resolve-from](https://npm.io/package/resolve-from.md) ^4.0.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 0.2.0 (latest) — 2017-10-28
- 0.1.0 — 2017-10-28

## README

# Freshload

## Description
A simple module to clear require cache and reload for testing. 

## Why
There are others out there but none were capable of clearing `node-config` properly. 

## Usage

     // index.js
     const config = require('config')
     ...

    // test.js
    const freshload = require('freshload')

    test((t) => {
        const app = freshload(../index.js)
        ...
    })


## Thanks
This code was inspired by this StackOverflow [answer](https://stackoverflow.com/a/14801711/856498).

---
_Source: https://npm.io/package/freshload · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
