escover 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ChangeLog +6 -0
- package/README.md +1 -5
- package/lib/config.js +13 -1
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
|
@@ -53,11 +53,7 @@ escover npm test
|
|
|
53
53
|
|
|
54
54
|
When everything is covered:
|
|
55
55
|
|
|
56
|
-

|
|
56
|
+

|
|
61
57
|
|
|
62
58
|
## What if I want to use 🎩`ESCover` with `mock-import`?
|
|
63
59
|
|
package/lib/config.js
CHANGED
|
@@ -4,8 +4,20 @@ import {findUpSync} from 'find-up';
|
|
|
4
4
|
|
|
5
5
|
const {parse} = JSON;
|
|
6
6
|
|
|
7
|
+
const addStars = (patterns) => {
|
|
8
|
+
const result = [];
|
|
9
|
+
for (const pattern of patterns) {
|
|
10
|
+
result.push(...[
|
|
11
|
+
`**/${pattern}/**`,
|
|
12
|
+
pattern,
|
|
13
|
+
]);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
|
|
7
19
|
export const isExclude = (name, patterns) => {
|
|
8
|
-
const isMatch = picomatch(patterns, {
|
|
20
|
+
const isMatch = picomatch(addStars(patterns), {
|
|
9
21
|
dot: true,
|
|
10
22
|
});
|
|
11
23
|
|