Skip to content

Commit e37218f

Browse files
committed
cleanup
1 parent 504b51a commit e37218f

1 file changed

Lines changed: 275 additions & 101 deletions

File tree

test/__snapshots__/index.spec.ts.snap

Lines changed: 275 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,5 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`makeUniversalApp asar mode no asar mode should correctly merge two identical app folders 1`] = `
4-
[
5-
"index.js",
6-
{
7-
"content": "{
8-
"name": "app",
9-
"main": "index.js"
10-
}",
11-
"name": "package.json",
12-
},
13-
]
14-
`;
15-
16-
exports[`makeUniversalApp asar mode no asar mode should correctly merge two identical app folders 2`] = `
17-
{
18-
"Contents/Info.plist": {},
19-
}
20-
`;
21-
22-
exports[`makeUniversalApp asar mode no asar mode should shim two different app folders 1`] = `
23-
{
24-
"files": {
25-
"index.js": {
26-
"integrity": {
27-
"algorithm": "SHA256",
28-
"blockSize": 4194304,
29-
"blocks": [
30-
"f1e14240f7c833900fca84fabc2f0ff27084efdf1c5b228b015515de3f8fa28e",
31-
],
32-
"hash": "f1e14240f7c833900fca84fabc2f0ff27084efdf1c5b228b015515de3f8fa28e",
33-
},
34-
"size": 1063,
35-
},
36-
"package.json": {
37-
"integrity": {
38-
"algorithm": "SHA256",
39-
"blockSize": 4194304,
40-
"blocks": [
41-
"2873266521e41d58d02e7acfbbbdb046edfa04b6ce262b8987de8e8548671fc7",
42-
],
43-
"hash": "2873266521e41d58d02e7acfbbbdb046edfa04b6ce262b8987de8e8548671fc7",
44-
},
45-
"size": 33,
46-
},
47-
},
48-
}
49-
`;
50-
51-
exports[`makeUniversalApp asar mode no asar mode should shim two different app folders 2`] = `
52-
[
53-
"private/var/i-aint-got-no-rhythm.bin",
54-
]
55-
`;
56-
57-
exports[`makeUniversalApp asar mode no asar mode should shim two different app folders 3`] = `
58-
[
59-
"index.js",
60-
{
61-
"content": "{
62-
"name": "app",
63-
"main": "index.js"
64-
}",
65-
"name": "package.json",
66-
},
67-
{
68-
"content": "hello world",
69-
"name": "private/var/file.txt",
70-
},
71-
"private/var/i-aint-got-no-rhythm.bin",
72-
]
73-
`;
74-
75-
exports[`makeUniversalApp asar mode no asar mode should shim two different app folders 4`] = `
76-
[
77-
"index.js",
78-
{
79-
"content": "{
80-
"name": "app",
81-
"main": "index.js"
82-
}",
83-
"name": "package.json",
84-
},
85-
{
86-
"content": "hello world",
87-
"name": "private/var/file.txt",
88-
},
89-
"private/var/hello-world.bin",
90-
]
91-
`;
92-
93-
exports[`makeUniversalApp asar mode no asar mode should shim two different app folders 5`] = `
94-
{
95-
"Contents/Info.plist": {
96-
"Resources/app.asar": {
97-
"algorithm": "SHA256",
98-
"hash": "27433ee3e34b3b0dabb29d18d40646126e80c56dbce8c4bb2adef7278b5a46c0",
99-
},
100-
},
101-
}
102-
`;
103-
1043
exports[`makeUniversalApp asar mode should correctly merge two identical asars 1`] = `
1054
{
1065
"files": {
@@ -505,6 +404,180 @@ exports[`makeUniversalApp asar mode should not inject ElectronAsarIntegrity into
505404
}
506405
`;
507406

407+
exports[`makeUniversalApp asar mode should shim asars with different unpacked dirs 1`] = `
408+
{
409+
"files": {
410+
"index.js": {
411+
"integrity": {
412+
"algorithm": "SHA256",
413+
"blockSize": 4194304,
414+
"blocks": [
415+
"0f6311dac07f0876c436ce2be042eb88c96e17eaf140b39627cf720dd87ad5b8",
416+
],
417+
"hash": "0f6311dac07f0876c436ce2be042eb88c96e17eaf140b39627cf720dd87ad5b8",
418+
},
419+
"size": 66,
420+
},
421+
"package.json": {
422+
"integrity": {
423+
"algorithm": "SHA256",
424+
"blockSize": 4194304,
425+
"blocks": [
426+
"d6226276d47adc7aa20e6c46e842e258f5157313074a035051a89612acdd6be3",
427+
],
428+
"hash": "d6226276d47adc7aa20e6c46e842e258f5157313074a035051a89612acdd6be3",
429+
},
430+
"size": 41,
431+
},
432+
"private": {
433+
"files": {
434+
"var": {
435+
"files": {
436+
"app": {
437+
"files": {
438+
"file.txt": {
439+
"link": "private/var/file.txt",
440+
},
441+
},
442+
},
443+
"file.txt": {
444+
"integrity": {
445+
"algorithm": "SHA256",
446+
"blockSize": 4194304,
447+
"blocks": [
448+
"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
449+
],
450+
"hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
451+
},
452+
"size": 11,
453+
"unpacked": true,
454+
},
455+
},
456+
},
457+
},
458+
},
459+
"var": {
460+
"link": "private/var",
461+
},
462+
},
463+
}
464+
`;
465+
466+
exports[`makeUniversalApp asar mode should shim asars with different unpacked dirs 2`] = `
467+
{
468+
"files": {
469+
"index.js": {
470+
"integrity": {
471+
"algorithm": "SHA256",
472+
"blockSize": 4194304,
473+
"blocks": [
474+
"0f6311dac07f0876c436ce2be042eb88c96e17eaf140b39627cf720dd87ad5b8",
475+
],
476+
"hash": "0f6311dac07f0876c436ce2be042eb88c96e17eaf140b39627cf720dd87ad5b8",
477+
},
478+
"size": 66,
479+
},
480+
"package.json": {
481+
"integrity": {
482+
"algorithm": "SHA256",
483+
"blockSize": 4194304,
484+
"blocks": [
485+
"d6226276d47adc7aa20e6c46e842e258f5157313074a035051a89612acdd6be3",
486+
],
487+
"hash": "d6226276d47adc7aa20e6c46e842e258f5157313074a035051a89612acdd6be3",
488+
},
489+
"size": 41,
490+
},
491+
"private": {
492+
"files": {
493+
"var": {
494+
"files": {
495+
"app": {
496+
"files": {
497+
"file.txt": {
498+
"link": "private/var/file.txt",
499+
},
500+
},
501+
},
502+
"file.txt": {
503+
"integrity": {
504+
"algorithm": "SHA256",
505+
"blockSize": 4194304,
506+
"blocks": [
507+
"b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
508+
],
509+
"hash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9",
510+
},
511+
"size": 11,
512+
},
513+
},
514+
},
515+
},
516+
},
517+
"var": {
518+
"link": "private/var",
519+
},
520+
},
521+
}
522+
`;
523+
524+
exports[`makeUniversalApp asar mode should shim asars with different unpacked dirs 3`] = `
525+
{
526+
"files": {
527+
"index.js": {
528+
"integrity": {
529+
"algorithm": "SHA256",
530+
"blockSize": 4194304,
531+
"blocks": [
532+
"b7e5f58d3c0fddc1a57d1279a7f19a34a01784f4036920d4b60a1e33f6d1635b",
533+
],
534+
"hash": "b7e5f58d3c0fddc1a57d1279a7f19a34a01784f4036920d4b60a1e33f6d1635b",
535+
},
536+
"size": 1068,
537+
},
538+
"package.json": {
539+
"integrity": {
540+
"algorithm": "SHA256",
541+
"blockSize": 4194304,
542+
"blocks": [
543+
"2873266521e41d58d02e7acfbbbdb046edfa04b6ce262b8987de8e8548671fc7",
544+
],
545+
"hash": "2873266521e41d58d02e7acfbbbdb046edfa04b6ce262b8987de8e8548671fc7",
546+
},
547+
"size": 33,
548+
},
549+
},
550+
}
551+
`;
552+
553+
exports[`makeUniversalApp asar mode should shim asars with different unpacked dirs 4`] = `
554+
[
555+
{
556+
"content": "hello world",
557+
"name": "private/var/file.txt",
558+
},
559+
]
560+
`;
561+
562+
exports[`makeUniversalApp asar mode should shim asars with different unpacked dirs 5`] = `
563+
{
564+
"Contents/Info.plist": {
565+
"Resources/app-arm64.asar": {
566+
"algorithm": "SHA256",
567+
"hash": "c7563e17e768e508045ffb888935d50dbf785bbba3ffb0068e5472fda4f6c199",
568+
},
569+
"Resources/app-x64.asar": {
570+
"algorithm": "SHA256",
571+
"hash": "7e6af4d00f4cc737eff922e2b386128a269f80887b79a011022f1276bdbe7832",
572+
},
573+
"Resources/app.asar": {
574+
"algorithm": "SHA256",
575+
"hash": "b62aaaed07ff72dc33da1720d900e0443c060285ef374ce1bdaef1d4f28b5fe4",
576+
},
577+
},
578+
}
579+
`;
580+
508581
exports[`makeUniversalApp force packages successfully if \`out\` bundle already exists and \`force\` is \`true\` 1`] = `
509582
{
510583
"files": {
@@ -544,3 +617,104 @@ exports[`makeUniversalApp force packages successfully if \`out\` bundle already
544617
},
545618
}
546619
`;
620+
621+
exports[`makeUniversalApp no asar mode should correctly merge two identical app folders 1`] = `
622+
[
623+
"index.js",
624+
{
625+
"content": "{
626+
"name": "app",
627+
"main": "index.js"
628+
}",
629+
"name": "package.json",
630+
},
631+
]
632+
`;
633+
634+
exports[`makeUniversalApp no asar mode should correctly merge two identical app folders 2`] = `
635+
{
636+
"Contents/Info.plist": {},
637+
}
638+
`;
639+
640+
exports[`makeUniversalApp no asar mode should shim two different app folders 1`] = `
641+
{
642+
"files": {
643+
"index.js": {
644+
"integrity": {
645+
"algorithm": "SHA256",
646+
"blockSize": 4194304,
647+
"blocks": [
648+
"f1e14240f7c833900fca84fabc2f0ff27084efdf1c5b228b015515de3f8fa28e",
649+
],
650+
"hash": "f1e14240f7c833900fca84fabc2f0ff27084efdf1c5b228b015515de3f8fa28e",
651+
},
652+
"size": 1063,
653+
},
654+
"package.json": {
655+
"integrity": {
656+
"algorithm": "SHA256",
657+
"blockSize": 4194304,
658+
"blocks": [
659+
"2873266521e41d58d02e7acfbbbdb046edfa04b6ce262b8987de8e8548671fc7",
660+
],
661+
"hash": "2873266521e41d58d02e7acfbbbdb046edfa04b6ce262b8987de8e8548671fc7",
662+
},
663+
"size": 33,
664+
},
665+
},
666+
}
667+
`;
668+
669+
exports[`makeUniversalApp no asar mode should shim two different app folders 2`] = `
670+
[
671+
"private/var/i-aint-got-no-rhythm.bin",
672+
]
673+
`;
674+
675+
exports[`makeUniversalApp no asar mode should shim two different app folders 3`] = `
676+
[
677+
"index.js",
678+
{
679+
"content": "{
680+
"name": "app",
681+
"main": "index.js"
682+
}",
683+
"name": "package.json",
684+
},
685+
{
686+
"content": "hello world",
687+
"name": "private/var/file.txt",
688+
},
689+
"private/var/i-aint-got-no-rhythm.bin",
690+
]
691+
`;
692+
693+
exports[`makeUniversalApp no asar mode should shim two different app folders 4`] = `
694+
[
695+
"index.js",
696+
{
697+
"content": "{
698+
"name": "app",
699+
"main": "index.js"
700+
}",
701+
"name": "package.json",
702+
},
703+
{
704+
"content": "hello world",
705+
"name": "private/var/file.txt",
706+
},
707+
"private/var/hello-world.bin",
708+
]
709+
`;
710+
711+
exports[`makeUniversalApp no asar mode should shim two different app folders 5`] = `
712+
{
713+
"Contents/Info.plist": {
714+
"Resources/app.asar": {
715+
"algorithm": "SHA256",
716+
"hash": "27433ee3e34b3b0dabb29d18d40646126e80c56dbce8c4bb2adef7278b5a46c0",
717+
},
718+
},
719+
}
720+
`;

0 commit comments

Comments
 (0)