Comments (1)
I'm not at a point where I fully understand this bug yet.
Within my unit tests, here's what happens.
it('should return correct response', function (done) {
[...]
lambdaLocal.execute({
event: request,
lambdaPath: './lambda/index.js',
profileName: 'default',
timeoutMs: 3000,
mute: true,
callback(err, data) {
if (err) {
throw err;
} else {
expect(data).eql(response);
done();
}
},
});
});
lambda-local basically executes the lambda function as it usually would, then calls callback(err, data)
(using the same data used for context.done()
). This makes it run my checks, which work if the response is correct. The issue is when the response isn't correct. Then it just times out rather than showing how the response and the data were different.
The issue seems to be that the assert clause is throwing the error in a block of the lambda-local code (where it calls callback
) rather than within the Mocha file. This means it never hits done, so times out. This still gives an error, so it tells you when stuff is broken, but really not very clearly.
What I don't understand is why this callback method works for 25/28 tests, but doesn't work for the remaining 3 tests that use the requesters. The main difference is the time taken to do the request, so it feels like it might be something to do with asynchronicity, but I can't figure it out yet. My plan is to implement the future changes to the SDK, see if that fixes it, then go from there.
from alexa-room-finder.
Related Issues (20)
- Add calendar owner name functionality
- 'No rooms available' detection too hacky
- Check and improve docs
- Improve testing to check responses
- Improve testing section of README
- Concerns about future of testing HOT 3
- Add Node file to test authentication/get tokens
- New room names HOT 1
- Copying ARN
- Security Model HOT 2
- Server-side paging
- How to get token
- Microsoft/Amazon Incompatibility HOT 1
- Shared Calendars HOT 2
- Images for ReadMe HOT 4
- Wrong response or crash if no rooms are available HOT 1
- Handling of request errors
- Undiagnosed issues with StartOverIntent. HOT 1
- Test whether inviting rooms to events from the API actually works HOT 1
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 alexa-room-finder.