mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
JS: Update Express test
This commit is contained in:
@@ -3,3 +3,7 @@ import javascript
|
||||
query predicate test_RequestExpr(Express::RequestExpr e, HTTP::RouteHandler res) {
|
||||
res = e.getRouteHandler()
|
||||
}
|
||||
|
||||
query predicate test_RequestExprStandalone(Express::RequestExpr e) {
|
||||
not exists(e.getRouteHandler())
|
||||
}
|
||||
|
||||
@@ -1024,6 +1024,8 @@ test_RequestExpr
|
||||
| src/express.js:50:3:50:5 | req | src/express.js:46:22:51:1 | functio ... ame];\\n} |
|
||||
| src/inheritedFromNode.js:7:2:7:4 | req | src/inheritedFromNode.js:4:15:8:1 | functio ... .url;\\n} |
|
||||
| src/responseExprs.js:17:5:17:7 | req | src/responseExprs.js:16:30:42:1 | functio ... }\\n} |
|
||||
test_RequestExprStandalone
|
||||
| typed_src/tst.ts:6:3:6:3 | x |
|
||||
test_RouteHandlerExpr_getAsSubRouter
|
||||
| src/csurf-example.js:13:17:13:19 | api | src/csurf-example.js:30:16:30:35 | new express.Router() |
|
||||
| src/express2.js:6:9:6:14 | router | src/express2.js:2:14:2:23 | e.Router() |
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"include": ["typed_src"]
|
||||
}
|
||||
|
||||
13
javascript/ql/test/library-tests/frameworks/Express/typed_src/shim.d.ts
vendored
Normal file
13
javascript/ql/test/library-tests/frameworks/Express/typed_src/shim.d.ts
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
declare namespace ServeStaticCore {
|
||||
interface Request {
|
||||
body: any;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'express' {
|
||||
interface Request extends ServeStaticCore.Request {}
|
||||
}
|
||||
|
||||
declare module 'express-serve-static-core' {
|
||||
export = ServeStaticCore;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
/// <reference path="./shim.d.ts"/>
|
||||
|
||||
import * as express from 'express';
|
||||
|
||||
function test(x: express.Request) {
|
||||
x.body;
|
||||
}
|
||||
Reference in New Issue
Block a user