JS: add integration test for diagnostic messages

This commit is contained in:
Arthur Baars
2023-03-08 16:04:49 +01:00
parent 51599b3cae
commit e5be8ab1e5
4 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
{
"location": {
"endColumn": 4,
"endLine": 1,
"file": "bad.js",
"startColumn": 4,
"startLine": 1
},
"markdownMessage": "A parse error occurred: Unexpected token. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.",
"severity": "warning",
"source": {
"extractorName": "javascript",
"id": "javascript/parse-error",
"name": "Parse error"
},
"visibility": {
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -0,0 +1,7 @@
import os
from create_database_utils import *
from diagnostics_test_utils import *
run_codeql_database_create([], lang="javascript", runFunction = runSuccessfully, db = None)
check_diagnostics()

View File

@@ -0,0 +1,3 @@
dependencies:
codeql/javascript-all: '*'
codeql/javascript-queries: '*'