Skip to content

Commit 176597b

Browse files
committed
additional test cases for #72
1 parent 872b277 commit 176597b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

test/requests.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ describe('Request Tests:', function() {
3838
expect(body.request.clientType).to.equal('desktop')
3939
expect(body.request.clientCountry).to.equal('US')
4040
expect(body.request.route).to.equal('/test/hello')
41+
expect(body.request.query.qs1).to.equal('foo')
42+
expect(body.request.query.qs2).to.deep.equal(['foo','bar'])
43+
expect(body.request.query.qs3).to.deep.equal(['bat','baz'])
4144
// console.log(body);
4245
})
4346

@@ -57,6 +60,9 @@ describe('Request Tests:', function() {
5760
expect(body.request.clientType).to.equal('desktop')
5861
expect(body.request.clientCountry).to.equal('US')
5962
expect(body.request.route).to.equal('/test/hello')
63+
expect(body.request.query.qs1).to.equal('foo')
64+
expect(body.request.query.qs2).to.deep.equal(['foo','bar'])
65+
expect(body.request.query.qs3).to.deep.equal(['bat','baz'])
6066
// console.log(body);
6167
})
6268
})

test/sample-event-apigateway1.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@
4747
"resource": "/{proxy+}",
4848
"httpMethod": "GET",
4949
"queryStringParameters": {
50-
"name": "me"
50+
"qs1": "foo",
51+
"qs2": "bar"
52+
},
53+
"multiValueQueryStringParameters": {
54+
"qs2": [ "foo", "bar" ],
55+
"qs3": [ "bat", "baz" ]
5156
},
5257
"stageVariables": {
5358
"stageVarName": "stageVarValue"

0 commit comments

Comments
 (0)