mirror of
https://github.com/developit/microbundle.git
synced 2026-01-18 13:56:35 +00:00
ignore files and folders starting with dot in the tests
also switch folder to the fixture directory because some rollup plugins rely on `process.cwd()`.
This commit is contained in:
parent
dcf99c620a
commit
47ccb24d3c
@ -12,7 +12,7 @@ const constant = konst => () => konst;
|
||||
|
||||
const printTree = (nodes, indentLevel = 0) => {
|
||||
const indent = join(times(indentLevel, constant(' ')));
|
||||
return join(nodes.map(node =>
|
||||
return join(nodes.filter(node => node.name[0] !== '.').map(node =>
|
||||
`${indent}${node.name}\n${node.type === 'directory' ? printTree(node.children, indentLevel + 1) : ''}`
|
||||
));
|
||||
};
|
||||
@ -26,10 +26,13 @@ describe('fixtures', () => {
|
||||
}
|
||||
|
||||
it(fixtureDir, async () => {
|
||||
const prevDir = process.cwd();
|
||||
process.chdir(path.resolve(fixturePath));
|
||||
const output = await microbundle({
|
||||
cwd: path.resolve(fixturePath),
|
||||
formats: 'es,cjs,umd'
|
||||
});
|
||||
process.chdir(prevDir);
|
||||
|
||||
const printedDir = printTree([dirTree(fixturePath)]);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user