Skip to content

Commit

Permalink
Ported test suite: skip-folders
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiospampinato committed Sep 14, 2024
1 parent 2cc594e commit e7606cb
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/__fixtures__/skip-folders/a/file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fooA( )
1 change: 1 addition & 0 deletions test/__fixtures__/skip-folders/b/file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fooB( )
15 changes: 15 additions & 0 deletions test/__tests__/__snapshots__/skip-folders.js.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`skip folders passed specifically (stdout) 1`] = `
"a/file.js
b/file.js"
`;

exports[`skip folders passed specifically (write) 1`] = `[]`;

exports[`skips folders in glob (stdout) 1`] = `
"a/file.js
b/file.js"
`;

exports[`skips folders in glob (write) 1`] = `[]`;
24 changes: 24 additions & 0 deletions test/__tests__/skip-folders.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { runCli } from "../utils";

describe("skips folders in glob", () => {
runCli("skip-folders", [
"**/*",
"-l",
]).test({
status: 1,
stderr: "",
});
});

describe("skip folders passed specifically", () => {
runCli("skip-folders", [
"a",
"a/file.js",
"b",
"b/file.js",
"-l",
]).test({
status: 1,
stderr: "",
});
});

0 comments on commit e7606cb

Please sign in to comment.