Skip to content

Serverless command "invoke test" not found. Run "serverless help" for a list of all available commands. #47

@ashish-akshantal

Description

@ashish-akshantal

my current package.json configuration looks like

"scripts": {
    "deploy": "sls deploy",
    "test": "jest --coverage",
    "test:coverage": "npm run test -- --coverage --watchAll=false || exit 0"
  },
  "jest": {
    "collectCoverage": true,
    "verbose": true,
    "coverageReporters": [
      "json",
      "html"
    ],
    "coverageThreshold": {
      "global": {
        "branches": 90,
        "functions": 90,
        "lines": 90,
        "statements": 90
      }
    }
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "aws-sdk": "^2.930.0",
    "aws-sdk-mock": "^5.2.1",
    "cors": "^2.8.5",
    "joi": "^17.4.0",
    "lodash.get": "^4.4.2",
    "lodash.set": "^4.3.2",
    "moment": "^2.29.1",
    "serverless": "^1.83.3",
    "serverless-jest-plugin": "^0.3.0",
    "serverless-offline": "^4.10.6",
    "serverless-prune-plugin": "^1.5.0",
    "uuidv4": "^6.2.10"
  }

I run sls invoke test and it fails with the error

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