snippets and injections for transformation query testing

This commit is contained in:
Ivar Fatland
2025-10-15 16:37:51 +02:00
parent 2b20e564d0
commit cb385f90a7
2 changed files with 25 additions and 0 deletions
@@ -0,0 +1,8 @@
(block_mapping_pair
key: (flow_node) @_run
(#any-of? @_run "query" "sql")
value: (block_node
(block_scalar) @injection.content
(#set! injection.language "sql")
(#offset! @injection.content 0 1 0 0)))
+17
View File
@@ -14,3 +14,20 @@ snippet singleHeader
Diagnostics:
Suppress:
- misc-definitions-in-headers
snippet testingTemplate
client_name: ${1:data}-testing
project: ${2|"abp-dev",["abp-dev"\, "abp-test"],["abp-dev"\, "abp-test"\, "abp"]|}
tests:
$0
snippet testCase
- name: ${1:Some sentence describing what you know to be true if the test passes.}
timeout_is: ${2|failure,warning|}
print_output: ${3|on_failure,on_success,always,never|}
disabled: ${4|false,true|}
limit: ${5:null}
source_limit: ${6:null}
query: |
${0:SELECT * FROM table WHERE condition;}
expected: {"type": ${7|"exact"\, "n_rows": 0,"minimum"\, "n_rows": 1,"maximum"\, "n_rows": 1,"between"\, "min_rows": 0\, "max_rows": 1|}}