Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ashish-akshantal opened this issue Aug 16, 2021 · 2 comments

Comments

@ashish-akshantal
Copy link

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

@EmmanDizon
Copy link

have u already figure this out ?

@ZentPeople
Copy link

you need to add serverless-jest-plugin in serverless.yml under plugins. For more info, follow the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants