@@ -24,6 +24,7 @@ testCases(
2424 [ { } , either . makeRight ( '{}' ) ] ,
2525 [ 'a' , either . makeRight ( 'a' ) ] ,
2626 [ 'Hello, world!' , either . makeRight ( '"Hello, world!"' ) ] ,
27+ [ '@test' , either . makeRight ( '@test' ) ] ,
2728 [ { 0 : 'a' } , either . makeRight ( '{ a }' ) ] ,
2829 [ { 1 : 'a' } , either . makeRight ( '{ 1: a }' ) ] ,
2930 [
@@ -58,6 +59,17 @@ testCases(
5859 } ,
5960 either . makeRight ( '(a => :a)("it works!")' ) ,
6061 ] ,
62+ [
63+ {
64+ 0 : '@runtime' ,
65+ 1 : {
66+ 0 : '@function' ,
67+ parameter : 'context' ,
68+ body : { 0 : '@lookup' , query : 'context.program.start_time' } ,
69+ } ,
70+ } ,
71+ either . makeRight ( '{ @runtime, context => :context.program.start_time }' ) ,
72+ ] ,
6173] )
6274
6375testCases (
@@ -67,6 +79,7 @@ testCases(
6779 [ { } , either . makeRight ( '{}' ) ] ,
6880 [ 'a' , either . makeRight ( 'a' ) ] ,
6981 [ 'Hello, world!' , either . makeRight ( '"Hello, world!"' ) ] ,
82+ [ '@test' , either . makeRight ( '@test' ) ] ,
7083 [ { 0 : 'a' } , either . makeRight ( '{\n a\n}' ) ] ,
7184 [ { 1 : 'a' } , either . makeRight ( '{\n 1: a\n}' ) ] ,
7285 [
@@ -106,6 +119,19 @@ testCases(
106119 } ,
107120 either . makeRight ( '(a => :a)("it works!")' ) ,
108121 ] ,
122+ [
123+ {
124+ 0 : '@runtime' ,
125+ 1 : {
126+ 0 : '@function' ,
127+ parameter : 'context' ,
128+ body : { 0 : '@lookup' , query : 'context.program.start_time' } ,
129+ } ,
130+ } ,
131+ either . makeRight (
132+ '{\n @runtime\n context => :context.program.start_time\n}' ,
133+ ) ,
134+ ] ,
109135] )
110136
111137testCases (
@@ -115,6 +141,7 @@ testCases(
115141 [ { } , either . makeRight ( '{}' ) ] ,
116142 [ 'a' , either . makeRight ( '"a"' ) ] ,
117143 [ 'Hello, world!' , either . makeRight ( '"Hello, world!"' ) ] ,
144+ [ '@test' , either . makeRight ( '"@test"' ) ] ,
118145 [ { 0 : 'a' } , either . makeRight ( '{\n "0": "a"\n}' ) ] ,
119146 [ { 1 : 'a' } , either . makeRight ( '{\n "1": "a"\n}' ) ] ,
120147 [
0 commit comments