zowe/zowe-cli-sample-plugin

Test fail expecting expecting zowe command when bright was issued

phaumer opened this issue · 2 comments

I am following the CLI plugin tutorial, but cannot run the tests out of the box. They keep failing saying that they expected the command name bright in the snapshots

 FAIL  __tests__/__system__/cli/issue/cli.issue.system.test.ts (10.469s)
  ● zowe-cli-sample issue command › should display the help

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot "zowe-cli-sample issue command should display the help 1".

    - Snapshot
    + Received

    @@ -9,11 +9,11 @@
         required/optional/positional options.
      
       USAGE
       -----
      
    -    zowe zowe-cli-sample issue <command>
    +    bright zowe-cli-sample issue <command>
      
         Where <command> is one of the following:
      
       COMMANDS
       --------

      34 |         expect(response.stderr.toString()).toBe("");
      35 |         expect(response.status).toBe(0);
    > 36 |         expect(response.stdout.toString()).toMatchSnapshot();
         |                                            ^
      37 |     });
      38 | });
      39 | 

      at Object.<anonymous> (__tests__/__system__/cli/issue/cli.issue.system.test.ts:36:44)
      at fulfilled (__tests__/__system__/cli/issue/cli.issue.system.test.ts:14:58)

 › 1 snapshot failed.
 FAIL  __tests__/__system__/cli/fail/cli.fail.test.system.test.ts (10.472s)
  ● zowe-cli-sample fail command › should display the help

Works now with the latest updates.

Glad to hear that!