![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
api-getaway-testing
Advanced tools
api-getaway testing server
const assert = require('assert');
const supertest = require('supertest');
const apiGetway = require('api-getaway-testing');
const api = apiGetway({
'/test':(event, ctx, cb) => {
assert(event.queryStringParameters);
assert(event.pathParameters);
assert(event.headers);
assert(event.body.test === 'test');
assert(event.httpMethod);
assert(event.path);
assert(event.requestContext);
assert(event.stageVariables);
cb(null, {
statusCode:202,
body:'response',
headers:{
'Content-Type':'application/text'
}
});
},
'/test/other/:params':{
post: (event, ctx, cb) => {
assert(event.queryStringParameters.query === 'query');
assert(event.pathParameters.params === 'params');
assert(event.headers);
assert(event.body.data === 'data');
assert(event.httpMethod === 'POST');
assert(event.path === '/test/other/params');
assert(event.requestContext);
assert(event.stageVariables);
cb(null, {
statusCode:201,
body: { response:'response' },
headers:{
'Content-Type':'application/json'
}
});
}
}
}, 4000);
const agent = supertest(api);
const res = await agent.get('/test')
.send({test:'test'})
.expect(202);
assert(res.text === 'response');
const res = await agent.post('/test/other/params')
.query({ query:'query' })
.send({ data:'data' })
.expect(201);
assert.deepEqual(res.body, { response :'response' });
assert(res.headers['content-type'] === 'application/json; charset=utf-8');
Receive a object what is a map between path and lambda handler:
{
path: handler
}
or
{
path: {
method: handler,
otherMethod: otherHandler
}
}
You can pass a express instance with all middleware already attached.
The only middleware attached by getApiGetawayTesting is body-parser.
FAQs
module to test the api-getaway lambda integration
The npm package api-getaway-testing receives a total of 3 weekly downloads. As such, api-getaway-testing popularity was classified as not popular.
We found that api-getaway-testing demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.