New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

fileception

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fileception

Mock FS module

latest
npmnpm
Version
0.3.2
Version published
Maintainers
1
Created
Source

fileception

Mock out the FS module during a test, experimentally extracted from unexpected-fs:

var fileception = require('fileception');
var assert = require('assert');
var fs = require('fs');

it('should read the contents of a file', function () {
    fileception({
        '/foo': {
            'bar.txt': 'quux'
        }
    });

    assert.equal(fs.readFileSync('/foo/bar.txt', 'utf-8'), 'quux');
});

When the test is done, the fs module will automatically be restored.

FAQs

Package last updated on 27 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts