Comments (6)
I was having this same problem until I upgraded to 5.8. Now when I attempt to run all tests I now get 'Cannot find module', and is is trying to run tests for functions that I haven't created yet.
from serverless-mocha-plugin.
I created the missing tests and still had problems with running multiple tests. I noticed that the new tests I created had an extra wrapper.init(mod) statement. Once I added that to all of my existing tests I was able to run all tests and everything now passes!
from serverless-mocha-plugin.
I have updated to 5.8 but i am still getting the same issue :|
the tests run fine individually, i have five test files,
create, delete, index, show, update
when every single test has its own function
but when i run all the tests at same time only 'update' test passes and i get this error for others
Uncaught AssertionError: expected [ConfigError: Missing region in config] to be an object
at test/create.js:35:29
at Response. (functions/update/handler.js:22:25)
orTypeError: Cannot read property 'field' of undefined
at Object.module.exports.handler (functions/update/handler.js:6:24)
at Context. (test/delete.js:27:11)
should nt the last line i.e. response be 'functions/create/handlers.js' for create and so on ?
from serverless-mocha-plugin.
Have you moved wrapper.init to before()?
from serverless-mocha-plugin.
Hi! Did you create the tests that are failing with the latest module version or with a version prior to that.
The fix for the issue is related to the creation of the the test files. wrapper.init() should be inside before() or in it(). i.e. the existing test cases would need to be fixed manually.
-Mikael
On 09 Jun 2016, at 12:49, RafaΕ Janicki [email protected] wrote:
Have you moved wrapper.init to before()?
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub #17 (comment), or mute the thread https://github.com/notifications/unsubscribe/AIARbBvxxG1QyIXrFN0yv4b9o9d82c9Iks5qJ-GvgaJpZM4Ip-ec.
from serverless-mocha-plugin.
yeah that was the fix thanks, the wrapper.init() was being called earlier thanks for all the help!!!
from serverless-mocha-plugin.
Related Issues (20)
- Tests duplicates with multiple files HOT 2
- Exit code 0 when tests fail HOT 3
- Support for bdd-lazy-vars
- Remove warning for nodejs10.x runtime
- Is this the end? HOT 1
- sls invoke test -c does not exit. HOT 1
- nyc with this plugin not generate good output HOT 1
- startOffline.sh not working with newer versions of serverless offline HOT 2
- error: node.js 10.x is not supported when running sls create function HOT 2
- Is it planned to release v1.12.0 also on npmjs? HOT 2
- Release support for Node 12 to npm HOT 1
- Post test script fails to run if tests fail
- Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called;
- Error: Cannot find module 'undefined/path/to/functions' HOT 3
- How to run all tests that are in different directories HOT 1
- TypeError: Cannot read property 'handler' of undefined HOT 5
- Support for typescript base projects
- Not working with typescript and serverless v2
- Snyk reports indirect vulnerabilities
- serverless-mocha-plugin plugin does not set types (yet) which will be required in serverless v4.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless-mocha-plugin.