How to use the mkdirp.__getDirs function in mkdirp

To help you get started, we’ve selected a few mkdirp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vutran / zel / __tests__ / utils.js View on Github external
it('should write content to a file', async () => {
            await write('test/foo.txt', 'FOO', '/target/dir');

            expect(mkdirp)
                .toBeCalled();
            expect(mkdirp.__getDirs())
                .toContain('/target/dir/test');
            expect(fs.writeFile)
                .toBeCalled();
            expect(fs.__getFiles())
                .toEqual({ '/target/dir/test/foo.txt': 'FOO' });
        });
    });

mkdirp

Recursively mkdir, like `mkdir -p`

MIT
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis