From f9a77c5c27aede4e5978eb55d9b7af781b680a1d Mon Sep 17 00:00:00 2001 From: João Augusto Costa Branco Marado Torres Date: Tue, 24 Jun 2025 12:08:41 -0300 Subject: feat!: initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: João Augusto Costa Branco Marado Torres --- tests/fixtures/test_data.ts | 63 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tests/fixtures/test_data.ts (limited to 'tests/fixtures/test_data.ts') diff --git a/tests/fixtures/test_data.ts b/tests/fixtures/test_data.ts new file mode 100644 index 0000000..d2143ed --- /dev/null +++ b/tests/fixtures/test_data.ts @@ -0,0 +1,63 @@ +export const TRUE = true; +export const FALSE = false; + +export const passphrase = "Za39PSymj5EcuzMs9kSNsAS3KbfzKHHP"; + +export const gitDir = new URL("file:///home/user/project/"); + +const gitLogPrettyOutput = new TextEncoder().encode([ + "abcdef1234567890abcdef1234567890abcdef12", // long hash + "abcdef1", // short hash + "2024-06-17T12:00:00Z", // author date + "Alice", // author name + "alice@example.com", // author email + "2024-06-17T12:01:00Z", // committer date + "Bob", // committer name + "bob@example.com", // committer email + "bob@example.com", // signer + "ABCDEF", // key (short) + "ABCDEF123456", // key fingerprint (long) + "gpg: Signature made...", // raw line 1 + "gpg: Good signature from...", // raw line 2 +].join("\n")) as Uint8Array; + +const gitDiffTreeOutput = new TextEncoder().encode([ + "M\tfile.ts", + "A\tnew_file.ts", +].join("\n")) as Uint8Array; + +const emptyOutput = new TextEncoder().encode("") as Uint8Array; + +export const gitLogPrettyCommandOutput: Promise = Promise + .resolve({ + stdout: gitLogPrettyOutput, + code: 0, + signal: null, + stderr: emptyOutput, + success: true, + }); +export const gitDiffTreeCommandOutput: Promise = Promise + .resolve({ + stdout: gitDiffTreeOutput, + code: 0, + signal: null, + stderr: emptyOutput, + success: true, + }); +export const gitRevParseCommandOutput: Promise = Promise + .resolve({ + stdout: new TextEncoder().encode(gitDir.pathname) as Uint8Array< + ArrayBuffer + >, + code: 0, + signal: null, + stderr: emptyOutput, + success: true, + }); +export const emptyCommandOutput: Promise = Promise.resolve({ + stdout: emptyOutput, + code: 0, + signal: null, + stderr: emptyOutput, + success: true, +}); -- cgit v1.2.3