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

how to define jest configuration in custom file #14

Open
ozbillwang opened this issue Nov 15, 2017 · 2 comments
Open

how to define jest configuration in custom file #14

ozbillwang opened this issue Nov 15, 2017 · 2 comments

Comments

@ozbillwang
Copy link

ozbillwang commented Nov 15, 2017

Here is my serverless file which I define the plugin and variable in a custom file

custom: ${file(${opt:stage, self:provider.stage}.yml)}

plugins: ${self:custom.plugins, ''}

my environment file:

$ cat dev.yml
plugins:
  - serverless-jest-plugin
jest:
  collectCoverage: true

Here is the error I got.

$ sls create test -f auth

  Serverless Error ---------------------------------------

  Serverless command "create test" not found

  Run "serverless help" for a list of all available commands.

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Forums:        forum.serverless.com
     Chat:          gitter.im/serverless/serverless

  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           6.11.3
     Serverless Version:     1.24.1

The other variables in custom environment file works fine, which I used to define stage, service name, etc.

If I follow the README to define jest plugin and configuration directly in serverless.yml, it works.

@taschik
Copy link

taschik commented Jan 23, 2024

@ozbillwang did you ever find a solution to your problem?

@ozbillwang
Copy link
Author

no, i moved on with aws sam.

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

2 participants