@@ -13,7 +13,7 @@ import { after, before } from 'mocha';
1313// Because the VSCode debugger seems to sandbox the editor
1414// it spins up, so globalStorage is a temp folder, not the
1515// one getExtensionContext().globalStorageUri returns
16- suite . skip ( 'Neo4j version specific linting spec' , ( ) => {
16+ suite ( 'Neo4j version specific linting spec' , ( ) => {
1717 before ( async ( ) => {
1818 process . env . LINTER_SWITCHING_TESTS = 'true' ;
1919 // We need to reconnect to neo4j so that the switching
@@ -33,7 +33,7 @@ suite.skip('Neo4j version specific linting spec', () => {
3333 } ) ;
3434
3535 async function testNeo4jSpecificLinting ( ) {
36- const textFile = 'subquery-call .cypher' ;
36+ const textFile = 'cypher-versioned .cypher' ;
3737 const docUri = getDocumentUri ( textFile ) ;
3838 await openDocument ( docUri ) ;
3939
@@ -42,27 +42,11 @@ suite.skip('Neo4j version specific linting spec', () => {
4242 expected : [
4343 new vscode . Diagnostic (
4444 new vscode . Range (
45- new vscode . Position ( 1 , 0 ) ,
46- new vscode . Position ( 4 , 1 ) ,
45+ new vscode . Position ( 0 , 26 ) ,
46+ new vscode . Position ( 0 , 27 ) ,
4747 ) ,
48- 'CALL subquery without a variable scope clause is now deprecated. Use CALL (n) { ... }' ,
49- vscode . DiagnosticSeverity . Warning ,
50- ) ,
51- new vscode . Diagnostic (
52- new vscode . Range (
53- new vscode . Position ( 5 , 7 ) ,
54- new vscode . Position ( 5 , 9 ) ,
55- ) ,
56- 'Function id is deprecated. Alternative: elementId or an application-generated id' ,
57- vscode . DiagnosticSeverity . Warning ,
58- ) ,
59- new vscode . Diagnostic (
60- new vscode . Range (
61- new vscode . Position ( 5 , 7 ) ,
62- new vscode . Position ( 5 , 12 ) ,
63- ) ,
64- "The query used a deprecated function. ('id' has been replaced by 'elementId or an application-generated id')" ,
65- vscode . DiagnosticSeverity . Warning ,
48+ 'Variable `m` not defined' ,
49+ vscode . DiagnosticSeverity . Error ,
6650 ) ,
6751 ] ,
6852 } ) ;
@@ -73,11 +57,11 @@ suite.skip('Neo4j version specific linting spec', () => {
7357 expected : [
7458 new vscode . Diagnostic (
7559 new vscode . Range (
76- new vscode . Position ( 5 , 7 ) ,
77- new vscode . Position ( 5 , 12 ) ,
60+ new vscode . Position ( 0 , 0 ) ,
61+ new vscode . Position ( 0 , 6 ) ,
7862 ) ,
79- 'The query used a deprecated function: `id`. ' ,
80- vscode . DiagnosticSeverity . Warning ,
63+ 'Expected any of ALTER, CALL, CREATE, DEALLOCATE, DELETE, DENY, DETACH, DROP, DRYRUN, ENABLE, EXPLAIN, FINISH, FOREACH, GRANT, INSERT, LOAD, MATCH, MERGE, NODETACH, OPTIONAL, PROFILE, REALLOCATE, REMOVE, RENAME, RETURN, REVOKE, SET, SHOW, START, STOP, TERMINATE, UNWIND, USE, USING or WITH ' ,
64+ vscode . DiagnosticSeverity . Error ,
8165 ) ,
8266 ] ,
8367 } ) ;
0 commit comments