mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
add tests
This commit is contained in:
@@ -15,3 +15,14 @@ module.exports = routes`
|
||||
GET /redirect/:redirect_url redirect
|
||||
POST /packages/new createPackage
|
||||
`(require('../views'))
|
||||
|
||||
|
||||
const a = routes`GET /packages/package/${p} viewPackage`(require('../views')) // test:routeSetup
|
||||
|
||||
const b = routes`GET / list`({ ...require('../views'), ...require('../views/orgs') }) // test: routeSetup
|
||||
|
||||
const c = routes`POST /message handleMessage`({ handleMessage: console.log }) // test: routeSetup
|
||||
|
||||
const d = routes`GET /version versionHandler`({ versionHandler: (req, context) => { console.log(req) } }) // test: routeSetup
|
||||
|
||||
const e = routes`GET / handler`({ handler: async (req, context) => { console.log(req) } }) // test: routeSetup
|
||||
|
||||
@@ -26,6 +26,11 @@ passingPositiveTests
|
||||
| PASSED | headerDefinition | lib/views/index.js:107:88:107:150 | // test ... inition |
|
||||
| PASSED | redirectSink | lib/views/index.js:54:54:54:82 | // test ... source |
|
||||
| PASSED | responseBody | lib/views/index.js:38:61:38:136 | // test ... nseBody |
|
||||
| PASSED | routeSetup | lib/routes/index.js:20:79:20:96 | // test:routeSetup |
|
||||
| PASSED | routeSetup | lib/routes/index.js:22:87:22:105 | // test: routeSetup |
|
||||
| PASSED | routeSetup | lib/routes/index.js:24:81:24:99 | // test: routeSetup |
|
||||
| PASSED | routeSetup | lib/routes/index.js:26:107:26:125 | // test: routeSetup |
|
||||
| PASSED | routeSetup | lib/routes/index.js:28:92:28:110 | // test: routeSetup |
|
||||
| PASSED | source | lib/views/index.js:24:56:24:70 | // test: source |
|
||||
| PASSED | source | lib/views/index.js:29:28:29:42 | // test: source |
|
||||
| PASSED | source | lib/views/index.js:30:28:30:42 | // test: source |
|
||||
|
||||
@@ -51,7 +51,7 @@ query predicate passingPositiveTests(string res, string expectation, InlineTest
|
||||
expectation = "source" and
|
||||
exists(RemoteFlowSource n | t.inNode(n))
|
||||
or
|
||||
expectation = "setup" and
|
||||
expectation = "routeSetup" and
|
||||
exists(Http::RouteSetup n | t.inNode(n))
|
||||
or
|
||||
expectation = "handler" and
|
||||
@@ -107,7 +107,7 @@ query predicate failingPositiveTests(string res, string expectation, InlineTest
|
||||
expectation = "source" and
|
||||
not exists(RemoteFlowSource n | t.inNode(n))
|
||||
or
|
||||
expectation = "setup" and
|
||||
expectation = "routeSetup" and
|
||||
not exists(Http::RouteSetup n | t.inNode(n))
|
||||
or
|
||||
expectation = "handler" and
|
||||
@@ -163,7 +163,7 @@ query predicate passingNegativeTests(string res, string expectation, InlineTest
|
||||
expectation = "!source" and
|
||||
not exists(RemoteFlowSource n | t.inNode(n))
|
||||
or
|
||||
expectation = "!setup" and
|
||||
expectation = "!routeSetup" and
|
||||
not exists(Http::RouteSetup n | t.inNode(n))
|
||||
or
|
||||
expectation = "!handler" and
|
||||
@@ -219,7 +219,7 @@ query predicate failingNegativeTests(string res, string expectation, InlineTest
|
||||
expectation = "!source" and
|
||||
exists(RemoteFlowSource n | t.inNode(n))
|
||||
or
|
||||
expectation = "!setup" and
|
||||
expectation = "!routeSetup" and
|
||||
exists(Http::RouteSetup n | t.inNode(n))
|
||||
or
|
||||
expectation = "!handler" and
|
||||
|
||||
Reference in New Issue
Block a user