0.2.0 • Published 7 years ago

freshload v0.2.0

Weekly downloads
1
License
ISC
Repository
github
Last release
7 years ago

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.