zowe / zowe-cli-sample-plugin

Plugin Tutorial for Zowe CLI
Other
10 stars 15 forks source link

Test fail expecting expecting zowe command when bright was issued #31

Closed phaumer closed 5 years ago

phaumer commented 5 years ago

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
phaumer commented 5 years ago

Works now with the latest updates.

zFernand0 commented 5 years ago

Glad to hear that!