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

Unable to test locally #57

Open
kaihendry opened this issue Oct 4, 2021 · 2 comments
Open

Unable to test locally #57

kaihendry opened this issue Oct 4, 2021 · 2 comments
Labels

Comments

@kaihendry
Copy link

Reproduction Steps

(ins)[hendry@t14s todo-src]$ npm run test

> hello_world@1.0.0 test
> mocha tests/unit/

Error: No test files found: "tests/unit/"

I also tried following the steps in the README, but the dynamodb create-table line doesn't work

(ins)[hendry@t14s ~]$ aws dynamodb create-table --table-name TodoTable --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST --endpoint-url http://127.0.0.1:8000

You must specify a region. You can also configure your region by running "aws configure".
(ins)[hendry@t14s ~]$ aws --region ap-southeast-1 dynamodb create-table --table-name TodoTable --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --billing-mode PAY_PER_REQUEST --endpoint-url http://127.0.0.1:8000

Unable to locate credentials. You can configure credentials by running "aws configure".
(ins)[hendry@t14s ~]$ aws --version
aws-cli/2.2.39 Python/3.8.8 Linux/5.14.8-arch1-1 exe/x86_64.arch prompt/off

This is 🐛 Bug Report

@kaihendry kaihendry added the bug label Oct 4, 2021
@kaihendry
Copy link
Author

Also it's not super clear to me if or how https://github.com/aws-samples/lambda-refarch-webapp/blob/master/todo-src/test/unit/test-handler.js gets used

@GQMai
Copy link

GQMai commented Oct 7, 2021

@kaihendry the test folder name is wrong. It should be "test/unit/"

@kaihendry kaihendry changed the title Unablt to test locally Unable to test locally Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants