mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
add test diagnostics test for internal error
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"timestamp": "2023-03-23T12:04:41.317+00:00",
|
||||
"source": {
|
||||
"id": "js/internal-error",
|
||||
"name": "Internal error",
|
||||
"extractorName": "javascript"
|
||||
},
|
||||
"markdownMessage": "Internal error: com.semmle.util.exception.CatastrophicError: The TypeScript parser wrapper crashed with exit code 1",
|
||||
"severity": "unknown",
|
||||
"visibility": {
|
||||
"cliSummaryTable": true,
|
||||
"statusPage": false,
|
||||
"telemetry": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
type Output<K, S extends any[]> = {
|
||||
(...args: S): any;
|
||||
};
|
||||
|
||||
declare function createThing<K extends string, S extends any[]>(
|
||||
type: K,
|
||||
fn: (...args: S) => any
|
||||
): Output<K, S>;
|
||||
|
||||
const one = createThing("one", () => ({}));
|
||||
|
||||
const two = createThing("two", () => ({}));
|
||||
|
||||
const three = createThing("three", (cursor: string) => null);
|
||||
const four = createThing("four", (error: number) => null);
|
||||
|
||||
type Events = Array<typeof one | typeof two | typeof three | typeof four>;
|
||||
@@ -0,0 +1,7 @@
|
||||
import os
|
||||
from create_database_utils import *
|
||||
from diagnostics_test_utils import *
|
||||
|
||||
run_codeql_database_create([], lang="javascript", runFunction = runUnsuccessfully, db = None)
|
||||
|
||||
check_diagnostics()
|
||||
@@ -0,0 +1 @@
|
||||
{}
|
||||
Reference in New Issue
Block a user