Skip to content

Running sls invoke test results in: the "path" argument must be of type string #19

@ldgarcia

Description

@ldgarcia

I am currently using "serverless-jest-plugin": "^0.1.6" and "jest": "^22.2.2".

This is my config in serverless.yml:

custom:
  jest:
     roots:
      - '<rootDir>/tests'   

Running either sls invoke test or sls invoke test --path tests it outputs:

 FAIL  tests/customMessage.test.js
  ● Test suite failed to run

    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
      
      at assertPath (path.js:28:11)
      at Object.relative (path.js:1259:5)

 FAIL  tests/postConfirmation.test.js
  ● Test suite failed to run

    TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string
      
      at assertPath (path.js:28:11)
      at Object.relative (path.js:1259:5)

Test Suites: 2 failed, 2 total
Tests:       0 total
Snapshots:   0 total
Time:        0.483s
Ran all test suites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions