Update ESLint and Prettier
This commit is contained in:
1 parent
5a9e03db2c
commit
ac980116bd
110 files changed
+2993
-2794
No files matched your search
+10
-10
@@ -2,7 +2,7 @@ import ava from "ava";
|
||||
import Path from "../lib/common/path";
|
||||
import PathSet from "../lib/common/path-set";
|
||||
|
||||
ava("depth", t => {
|
||||
ava("depth", (t) => {
|
||||
const pathSet = new PathSet();
|
||||
t.is(pathSet.depth, 0);
|
||||
pathSet.add(Path.parse(""));
|
||||
@@ -11,14 +11,14 @@ ava("depth", t => {
|
||||
t.is(pathSet.depth, 2);
|
||||
});
|
||||
|
||||
ava("add", t => {
|
||||
ava("add", (t) => {
|
||||
const pathSet = new PathSet();
|
||||
pathSet.add(Path.parse("a"));
|
||||
pathSet.add(Path.parse("a"));
|
||||
t.is(pathSet.find(Path.parse("a"), true, true, 99).length, 1);
|
||||
});
|
||||
|
||||
ava("get", t => {
|
||||
ava("get", (t) => {
|
||||
const pathSet = new PathSet();
|
||||
pathSet.add(Path.parse("a.*"));
|
||||
pathSet.add(Path.parse("a.a"));
|
||||
@@ -28,7 +28,7 @@ ava("get", t => {
|
||||
t.is(pathSet.get(Path.parse("*.a")), null);
|
||||
});
|
||||
|
||||
ava("find", t => {
|
||||
ava("find", (t) => {
|
||||
const pathSet = new PathSet();
|
||||
pathSet.add(Path.parse("a"));
|
||||
pathSet.add(Path.parse("a.*"));
|
||||
@@ -37,32 +37,32 @@ ava("find", t => {
|
||||
pathSet.add(Path.parse("*.*"));
|
||||
|
||||
t.deepEqual(
|
||||
pathSet.find(Path.parse(""), true, true, 1).map(p => p.toString()),
|
||||
pathSet.find(Path.parse(""), true, true, 1).map((p) => p.toString()),
|
||||
["a"]
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
pathSet.find(Path.parse(""), false, false, 2).map(p => p.toString()),
|
||||
pathSet.find(Path.parse(""), false, false, 2).map((p) => p.toString()),
|
||||
["a", "a.*", "a.a", "*.a", "*.*"]
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
pathSet.find(Path.parse("a.*"), false, false).map(p => p.toString()),
|
||||
pathSet.find(Path.parse("a.*"), false, false).map((p) => p.toString()),
|
||||
["a.*"]
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
pathSet.find(Path.parse("a.*"), false, true).map(p => p.toString()),
|
||||
pathSet.find(Path.parse("a.*"), false, true).map((p) => p.toString()),
|
||||
["a.*", "a.a"]
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
pathSet.find(Path.parse("a.*"), true, false).map(p => p.toString()),
|
||||
pathSet.find(Path.parse("a.*"), true, false).map((p) => p.toString()),
|
||||
["a.*", "*.*"]
|
||||
);
|
||||
|
||||
t.deepEqual(
|
||||
pathSet.find(Path.parse("a.*"), true, true).map(p => p.toString()),
|
||||
pathSet.find(Path.parse("a.*"), true, true).map((p) => p.toString()),
|
||||
["a.*", "a.a", "*.a", "*.*"]
|
||||
);
|
||||
});
|
||||
Reference in new issue
Block a user