Closed elliotrock closed 7 years ago
apologies in one of my tests I forgot to enclose the import of the functions with { }
here import {connection, pool} from '../src/dbConnection'
Actually I found this around creating an IAM user role:
http://docs.aws.amazon.com/lambda/latest/dg/vpc-rds-create-iam-role.html
I am getting this error when running a simple pool test in a serverless environment. Everything works with unit tests, even testing the Lambda promise:
TypeError: (0 , _dbConnection2.default) is not a function
My handler:
My test shows first a non-pool connection. Then a pool connection
/src/dbConnection.js
../lib/db.js
Tests once deploy for both a straight connection test and the pool test fail with that error.
Questions:
Cheers