snippets and injections for transformation query testing
This commit is contained in:
@@ -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)))
|
||||
|
||||
@@ -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|}}
|
||||
|
||||
Reference in New Issue
Block a user