Skip to content

Commit e941f97

Browse files
committed
add support for --reverse
1 parent 950e0b2 commit e941f97

11 files changed

+800
-3
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`Test reverse-multiple-patches: 00: the patches were applied 1`] = `
4+
"SNAPSHOT: the patches were applied
5+
'goodbye world';
6+
END SNAPSHOT"
7+
`;
8+
9+
exports[`Test reverse-multiple-patches: 01: --reverse undoes the patches 1`] = `
10+
"SNAPSHOT: --reverse undoes the patches
11+
patch-package 0.0.0
12+
Applying patches...
13+
[email protected] (3 goodbye) βœ”
14+
[email protected] (2 world) βœ”
15+
[email protected] (1 hello) βœ”
16+
END SNAPSHOT"
17+
`;
18+
19+
exports[`Test reverse-multiple-patches: 02: The patches can be reapplied 1`] = `
20+
"SNAPSHOT: The patches can be reapplied
21+
patch-package 0.0.0
22+
Applying patches...
23+
[email protected] (1 hello) βœ”
24+
[email protected] (2 world) βœ”
25+
[email protected] (3 goodbye) βœ”
26+
END SNAPSHOT"
27+
`;
28+
29+
exports[`Test reverse-multiple-patches: 03: if one of the patches fails then reverse only ondoes the ones that succeeded 1`] = `
30+
"SNAPSHOT: if one of the patches fails then reverse only ondoes the ones that succeeded
31+
patches/left-pad+1.3.0+003+goodbye.patch
32+
9: -'use schmorld';
33+
10: +'goodbye schmorld';
34+
apply broken
35+
patch-package 0.0.0
36+
Applying patches...
37+
[email protected] (1 hello) βœ”
38+
[email protected] (2 world) βœ”
39+
reverse all but broken
40+
patch-package 0.0.0
41+
Applying patches...
42+
[email protected] (2 world) βœ”
43+
[email protected] (1 hello) βœ”
44+
END SNAPSHOT"
45+
`;

0 commit comments

Comments
Β (0)