File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
- import { expandPlaceholders } from '../../src/Scripting/ExpandPlaceholders' ;
2
- import { makeQueryContext } from '../../src/Scripting/QueryContext' ;
1
+ import { makeQueryContextWithTasks } from '../../src/Scripting/QueryContext' ;
3
2
4
3
import { verifyMarkdownForDocs } from '../TestingTools/VerifyMarkdown' ;
5
4
import { MarkdownTable } from '../../src/lib/MarkdownTable' ;
5
+ import { parseAndEvaluateExpression } from '../../src/Scripting/TaskExpression' ;
6
+ import { TaskBuilder } from '../TestingTools/TaskBuilder' ;
6
7
import { addBackticks , determineExpressionType , formatToRepresentType } from './ScriptingTestHelpers' ;
7
8
8
9
describe ( 'query' , ( ) => {
9
10
function verifyFieldDataForReferenceDocs ( fields : string [ ] ) {
10
11
const markdownTable = new MarkdownTable ( [ 'Field' , 'Type' , 'Example' ] ) ;
11
12
const path = 'root/sub-folder/file containing query.md' ;
12
- const queryContext = makeQueryContext ( path ) ;
13
+ const task = new TaskBuilder ( ) . build ( ) ;
14
+ const queryContext = makeQueryContextWithTasks ( path , [ task ] ) ;
13
15
for ( const field of fields ) {
14
- const value1 = expandPlaceholders ( '{{' + field + '}}' , queryContext ) ;
16
+ const value1 = parseAndEvaluateExpression ( task , field , queryContext ) ;
15
17
const cells = [
16
18
addBackticks ( field ) ,
17
19
addBackticks ( determineExpressionType ( value1 ) ) ,
You can’t perform that action at this time.
0 commit comments