Skip to content

Commit 7a4e8dc

Browse files
committed
test: ignoring folder/files, issue #317
1 parent 1b7b04c commit 7a4e8dc

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div>input-nesting-index</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div>input-nesting-child/index</div>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div>input-nesting-index</div>

test/test-cli.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,24 @@ test('Specify the root of the output folder structure with root option', async t
273273
(await read(`${outputPath}/input-nesting-child/input-nesting.html`))
274274
);
275275
});
276+
277+
test('Ignoring files by pattern', async t => {
278+
const outputPath = 'test/expected/output-ignoring';
279+
rimraf.sync(outputPath);
280+
t.plan(3);
281+
await execa(cli, [
282+
'**/*.html',
283+
'!ignoring-input-child/**/*.html',
284+
'-o',
285+
outputPath,
286+
'-a',
287+
'-r',
288+
'test/fixtures/input-ignoring'
289+
]);
290+
t.true(await pathExists(outputPath));
291+
t.is(
292+
(await read('test/fixtures/input-ignoring/input.html')),
293+
(await read(`${outputPath}/input.html`))
294+
);
295+
t.false(await pathExists('test/expected/input-ignoring/ignoring-input-child'));
296+
});

0 commit comments

Comments
 (0)