Skip to content

Commit e5be8ab

Browse files
committed
JS: add integration test for diagnostic messages
1 parent 51599b3 commit e5be8ab

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4 %%% 5
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"location": {
3+
"endColumn": 4,
4+
"endLine": 1,
5+
"file": "bad.js",
6+
"startColumn": 4,
7+
"startLine": 1
8+
},
9+
"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.",
10+
"severity": "warning",
11+
"source": {
12+
"extractorName": "javascript",
13+
"id": "javascript/parse-error",
14+
"name": "Parse error"
15+
},
16+
"visibility": {
17+
"cliSummaryTable": true,
18+
"statusPage": true,
19+
"telemetry": true
20+
}
21+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import os
2+
from create_database_utils import *
3+
from diagnostics_test_utils import *
4+
5+
run_codeql_database_create([], lang="javascript", runFunction = runSuccessfully, db = None)
6+
7+
check_diagnostics()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dependencies:
2+
codeql/javascript-all: '*'
3+
codeql/javascript-queries: '*'

0 commit comments

Comments
 (0)