Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

TypeError: Cannot read property 'hex' of undefined #149

Open
g5becks opened this issue Jan 19, 2021 · 0 comments
Open

TypeError: Cannot read property 'hex' of undefined #149

g5becks opened this issue Jan 19, 2021 · 0 comments

Comments

@g5becks
Copy link

g5becks commented Jan 19, 2021

Describe the bug
Getting error TypeError: Cannot read property 'hex' of undefined

To Reproduce

Run "@strest/cli": "^2.5.1",

on Ubuntu 20.0.4

using node --version v14.15.3

with the following file

version: 2

variables: # Define variables here
  testUrl: http://127.0.0.1:8000
  to_log: true

requests:
  addUser:
    request:
      url: <$ testUrl $>/userMutations/addUser
      method: POST
      postData:
        mimeType: application/json
        text:
          name: <$ Faker("name.firstName") $>
          guid: <$ Faker("uuid") $>
    validate:
      - jsonpath: status
        regex: 2\d+
      - jsonpath: content.path.to.var
        expect: expect_value
  log: <$ to_log $>

-----------------------------------
$ strest api.strest.yml

Expected behavior
Expect test to run.

Full error below.

(node:2587049) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'hex' of undefined
    at Object.exports.colorizeMain (/home/g5becks/Dev/poppn/node_modules/@strest/cli/dist/handler.js:127:28)
    at /home/g5becks/Dev/poppn/node_modules/@strest/cli/dist/handler.js:71:51
    at step (/home/g5becks/Dev/poppn/node_modules/@strest/cli/dist/handler.js:33:23)
    at Object.next (/home/g5becks/Dev/poppn/node_modules/@strest/cli/dist/handler.js:14:53)
    at fulfilled (/home/g5becks/Dev/poppn/node_modules/@strest/cli/dist/handler.js:5:58)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant