Skip to content

Commit

Permalink
Fix snapshot to 80 columns
Browse files Browse the repository at this point in the history
  • Loading branch information
banga committed Dec 31, 2023
1 parent 264f500 commit 1da6aa9
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,23 @@ index 0000000..c72d334
+package-lock.json -diff
+yarn.lock -diff
`;
const expected = `
commit e250bec66b6c39d4c2f9e0e52a18245f16a7195a  
Author: Shrey Banga <banga.shrey@gmail.com>  
Date: Fri Dec 29 11:14:25 2023 -0500  
 
 Exclude lockfiles from diffs 
 
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ■■ .gitattributes 
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -0,0 +1,3 @@ 
  1  + # exclude lock files from git diff 
  2  + package-lock.json -diff 
  3  + yarn.lock -diff 
  4  
`;
const expected =
'\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;136;192;208mcommit\x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;191;97;106m e250bec66b6c39d4c2f9e0e52a18245f16a7195a \x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;76;86;106m \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;136;192;208mAuthor:\x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;208;135;112m Shrey Banga <banga.shrey@gmail.com> \x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;76;86;106m \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;136;192;208mDate:\x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;235;203;139m Fri Dec 29 11:14:25 2023 -0500 \x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;76;86;106m \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;76;86;106m \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;236;239;244m Exclude lockfiles from diffs\x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;216;222;233m \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;216;222;233m \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;235;203;139m────────────────────────────────────────────────────────────────────────────────\x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;235;203;139m \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m■■\x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;235;203;139m .gitattributes \x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;235;203;139m────────────────────────────────────────────────────────────────────────────────\x1B[39m\x1B[49m\n' +
'\x1B[48;2;43;43;43m\x1B[38;2;76;86;106m@@ -0,0 +1,3 @@ \x1B[39m\x1B[49m\n' +
'\x1B[48;2;46;52;64m\x1B[38;2;229;233;240m \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m 1 \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m + # exclude lock files from git \x1B[39m\x1B[49m\n' +
'\x1B[48;2;46;52;64m\x1B[38;2;229;233;240m \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m diff \x1B[39m\x1B[49m\n' +
'\x1B[48;2;46;52;64m\x1B[38;2;229;233;240m \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m 2 \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m + package-lock.json -diff \x1B[39m\x1B[49m\n' +
'\x1B[48;2;46;52;64m\x1B[38;2;229;233;240m \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m 3 \x1B[39m\x1B[49m\x1B[48;2;48;58;53m\x1B[38;2;163;190;140m + yarn.lock -diff \x1B[39m\x1B[49m\n' +
'\x1B[48;2;46;52;64m\x1B[38;2;229;233;240m \x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;76;86;106m 4 \x1B[39m\x1B[49m\x1B[48;2;43;43;43m\x1B[38;2;229;233;240m \x1B[39m\x1B[49m\n';
const { stdout, stderr } = spawnSync(
'node',
['./build/index.mjs', '--color'],
Expand Down

0 comments on commit 1da6aa9

Please sign in to comment.