We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ceaea1 commit a44c8a1Copy full SHA for a44c8a1
1 file changed
src/plugins/expressions/common/execution/execution.test.ts
@@ -376,6 +376,38 @@ describe('Execution', () => {
376
value: 5,
377
});
378
379
+
380
+ test('can use global variables', async () => {
381
+ const result = await run(
382
+ 'add val={var foo}',
383
+ {
384
+ variables: {
385
+ foo: 3,
386
+ },
387
388
+ null
389
+ );
390
391
+ expect(result).toMatchObject({
392
+ type: 'num',
393
+ value: 3,
394
+ });
395
396
397
+ test('can modify global variables', async () => {
398
399
+ 'add val={var_set name=foo value=66 | var bar} | var foo',
400
401
402
403
+ bar: 25,
404
405
406
407
408
409
+ expect(result).toBe(66);
410
411
412
413
describe('when arguments are missing', () => {
0 commit comments