mirror of
https://github.com/github/codeql.git
synced 2026-04-28 18:25:24 +02:00
JS: Add test
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
| bad1.js:1:7:1:7 | Error: Unexpected token | Extraction failed in bad1.js with error Error: Unexpected token | 2 |
|
||||
| bad2.ts:1:11:1:11 | Error: Expression expected. | Extraction failed in bad2.ts with error Error: Expression expected. | 2 |
|
||||
| bad2.ts:1:13:1:13 | Error: Expression expected. | Extraction failed in bad2.ts with error Error: Expression expected. | 2 |
|
||||
| bad3.html:2:11:2:11 | Error: Unexpected token | Extraction failed in bad3.html with error Error: Unexpected token | 2 |
|
||||
@@ -0,0 +1 @@
|
||||
Diagnostics/ExtractionErrors.ql
|
||||
@@ -0,0 +1,4 @@
|
||||
| contains-template.js:0:0:0:0 | contains-template.js | |
|
||||
| good1.js:0:0:0:0 | good1.js | |
|
||||
| good2.ts:0:0:0:0 | good2.ts | |
|
||||
| good3.html:0:0:0:0 | good3.html | |
|
||||
@@ -0,0 +1 @@
|
||||
Diagnostics/SuccessfullyExtractedFiles.ql
|
||||
1
javascript/ql/test/query-tests/Diagnostics/bad1.js
Normal file
1
javascript/ql/test/query-tests/Diagnostics/bad1.js
Normal file
@@ -0,0 +1 @@
|
||||
let x x x;
|
||||
1
javascript/ql/test/query-tests/Diagnostics/bad2.ts
Normal file
1
javascript/ql/test/query-tests/Diagnostics/bad2.ts
Normal file
@@ -0,0 +1 @@
|
||||
const z = ??;
|
||||
3
javascript/ql/test/query-tests/Diagnostics/bad3.html
Normal file
3
javascript/ql/test/query-tests/Diagnostics/bad3.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<script>
|
||||
let q q q q ; // error
|
||||
</script>
|
||||
@@ -0,0 +1,4 @@
|
||||
const obj = {
|
||||
// Template where we can't parse `x x x` but surrounding file still OK
|
||||
template: '<b [foo]="x x x"></a>'
|
||||
};
|
||||
1
javascript/ql/test/query-tests/Diagnostics/good1.js
Normal file
1
javascript/ql/test/query-tests/Diagnostics/good1.js
Normal file
@@ -0,0 +1 @@
|
||||
let x = 123;
|
||||
1
javascript/ql/test/query-tests/Diagnostics/good2.ts
Normal file
1
javascript/ql/test/query-tests/Diagnostics/good2.ts
Normal file
@@ -0,0 +1 @@
|
||||
const y: string = "dfg";
|
||||
3
javascript/ql/test/query-tests/Diagnostics/good3.html
Normal file
3
javascript/ql/test/query-tests/Diagnostics/good3.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<script>
|
||||
let qwe = 123;
|
||||
</script>
|
||||
1
javascript/ql/test/query-tests/Diagnostics/options
Normal file
1
javascript/ql/test/query-tests/Diagnostics/options
Normal file
@@ -0,0 +1 @@
|
||||
semmle-extractor-options: --tolerate-parse-errors --experimental
|
||||
Reference in New Issue
Block a user