Skip to content

Commit

Permalink
add support for --reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
ds300 committed Jul 12, 2023
1 parent 950e0b2 commit e941f97
Show file tree
Hide file tree
Showing 11 changed files with 800 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Test reverse-multiple-patches: 00: the patches were applied 1`] = `
"SNAPSHOT: the patches were applied
'goodbye world';
END SNAPSHOT"
`;

exports[`Test reverse-multiple-patches: 01: --reverse undoes the patches 1`] = `
"SNAPSHOT: --reverse undoes the patches
patch-package 0.0.0
Applying patches...
left-pad@1.3.0 (3 goodbye) βœ”
left-pad@1.3.0 (2 world) βœ”
left-pad@1.3.0 (1 hello) βœ”
END SNAPSHOT"
`;

exports[`Test reverse-multiple-patches: 02: The patches can be reapplied 1`] = `
"SNAPSHOT: The patches can be reapplied
patch-package 0.0.0
Applying patches...
left-pad@1.3.0 (1 hello) βœ”
left-pad@1.3.0 (2 world) βœ”
left-pad@1.3.0 (3 goodbye) βœ”
END SNAPSHOT"
`;

exports[`Test reverse-multiple-patches: 03: if one of the patches fails then reverse only ondoes the ones that succeeded 1`] = `
"SNAPSHOT: if one of the patches fails then reverse only ondoes the ones that succeeded
patches/left-pad+1.3.0+003+goodbye.patch
9: -'use schmorld';
10: +'goodbye schmorld';
apply broken
patch-package 0.0.0
Applying patches...
left-pad@1.3.0 (1 hello) βœ”
left-pad@1.3.0 (2 world) βœ”
reverse all but broken
patch-package 0.0.0
Applying patches...
left-pad@1.3.0 (2 world) βœ”
left-pad@1.3.0 (1 hello) βœ”
END SNAPSHOT"
`;
Loading

0 comments on commit e941f97

Please sign in to comment.