-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathHoistedNodeModuleTest.ts
69 lines (64 loc) · 1.55 KB
/
HoistedNodeModuleTest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import { assertPack, linuxDirTarget, verifyAsarFileTree } from "./helpers/packTester"
import { Platform } from "electron-builder"
test.ifAll("yarn workspace", () =>
assertPack(
"test-app-yarn-workspace",
{
targets: linuxDirTarget,
projectDir: "packages/test-app",
},
{
packed: context => verifyAsarFileTree(context.getResources(Platform.LINUX)),
}
)
)
test.ifAll("conflict versions", () =>
assertPack(
"test-app-yarn-workspace-version-conflict",
{
targets: linuxDirTarget,
projectDir: "packages/test-app",
},
{
packed: context => verifyAsarFileTree(context.getResources(Platform.LINUX)),
}
)
)
test.ifAll("yarn several workspaces", () =>
assertPack(
"test-app-yarn-several-workspace",
{
targets: linuxDirTarget,
projectDir: "packages/test-app",
},
{
packed: context => verifyAsarFileTree(context.getResources(Platform.LINUX)),
}
)
)
test.ifAll("yarn several workspaces and asarUnpack", () =>
assertPack(
"test-app-yarn-several-workspace",
{
targets: linuxDirTarget,
projectDir: "packages/test-app",
config: {
asarUnpack: ["**/node_modules/ms/**/*"],
},
},
{
packed: context => verifyAsarFileTree(context.getResources(Platform.LINUX)),
}
)
)
test.ifAll("yarn two package.json w/ native module", () =>
assertPack(
"test-app-two-native-modules",
{
targets: linuxDirTarget,
},
{
packed: context => verifyAsarFileTree(context.getResources(Platform.LINUX)),
}
)
)