@@ -99,4 +99,40 @@ describe('@hint', () => {
99
99
} ) ;
100
100
} ) ;
101
101
102
+ it ( 'should work with a second opening bracket' , ( ) => {
103
+ const lines = [ '+ Task One' , '' , "@hint('an example with a bracket ( in the middle')" ] ;
104
+ const next = task ( { result :result ( ) , lines, index :index ( ) } ) ;
105
+ const nextTask = next . pages [ 0 ] . tasks [ 0 ] ;
106
+ expect ( nextTask ) . to . deep . equal ( {
107
+ hints :[
108
+ 'an example with a bracket ( in the middle'
109
+ ] ,
110
+ description :'Task One\n'
111
+ } ) ;
112
+ } ) ;
113
+
114
+ it ( 'should work with a curly bracket' , ( ) => {
115
+ const lines = [ '+ Task One' , '' , "@hint('an example with a bracket { in the middle')" ] ;
116
+ const next = task ( { result :result ( ) , lines, index :index ( ) } ) ;
117
+ const nextTask = next . pages [ 0 ] . tasks [ 0 ] ;
118
+ expect ( nextTask ) . to . deep . equal ( {
119
+ hints :[
120
+ 'an example with a bracket { in the middle'
121
+ ] ,
122
+ description :'Task One\n'
123
+ } ) ;
124
+ } ) ;
125
+
126
+ it ( 'should work with a closing bracket' , ( ) => {
127
+ const lines = [ '+ Task One' , '' , "@hint('an example with a bracket ) in the middle')" ] ;
128
+ const next = task ( { result :result ( ) , lines, index :index ( ) } ) ;
129
+ const nextTask = next . pages [ 0 ] . tasks [ 0 ] ;
130
+ expect ( nextTask ) . to . deep . equal ( {
131
+ hints :[
132
+ 'an example with a bracket ) in the middle'
133
+ ] ,
134
+ description :'Task One\n'
135
+ } ) ;
136
+ } ) ;
137
+
102
138
} ) ; //@hint