Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carloscortonc committed Feb 25, 2024
1 parent 451fcb4 commit 986ec0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/__snapshots__/bash-completion.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`generateCompletions bash-script gets printed via process.stdout.write 1
"#!/usr/bin/env bash
# Bash completion script for cliName
# This file is automatically generated by running \`cliName complete\`.
# Created with cli-er@0.13.0 on 2022-08-04 00:00
# Created with cli-er@clier-version on 2022-08-04 00:00
function indirect(){
if [[ -z $ZSH_VERSION ]]; then
Expand Down
2 changes: 2 additions & 0 deletions test/bash-completion.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { generateCompletions } from "../src/bash-completion";
import * as utils from "../src/utils";
import d from "./data/definition.json";
import Cli from "../src";

describe("generateCompletions", () => {
beforeAll(() => {
const mockDate = new Date(2022, 7, 4);
jest.spyOn(global, "Date").mockImplementation((() => mockDate) as any);
jest.spyOn(utils, "getClierVersion").mockImplementation(() => "clier-version");
});
const cliOptions: any = {
cliName: "cliName",
Expand Down

0 comments on commit 986ec0d

Please sign in to comment.