File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,15 +14,15 @@ describe("The mockup-parser", function () {
1414 it ( "parses the data attribute of nested nodes" , function ( ) {
1515 const $el = $ ( `
1616 <div data-pat-testpattern="parentOption1: value1; parentOption2: value2">
17- <span data-pat-testpattern="option1: subvalue1; option2: subvalue2">
17+ <span class="pat-testpattern" data-pat-testpattern="option1: subvalue1; option2: subvalue2">
1818 nested mockup parser test
1919 </span>
2020 </div>` ) ;
21- const options = mockupParser . getOptions ( $el , "testpattern" ) ;
21+ const options = mockupParser . getOptions ( $ ( ".pat-testpattern" , $el ) , "testpattern" ) ;
2222 expect ( options . parentOption1 ) . toBe ( "value1" ) ;
2323 expect ( options . parentOption2 ) . toBe ( "value2" ) ;
24- expect ( options . option1 ) . toBe ( undefined ) ;
25- expect ( options . option2 ) . toBe ( undefined ) ;
24+ expect ( options . option1 ) . toBe ( "subvalue1" ) ;
25+ expect ( options . option2 ) . toBe ( "subvalue2" ) ;
2626 } ) ;
2727 it ( "parses the data attribute of a single node and preserves injected options" , function ( ) {
2828 const $el = $ ( `
You can’t perform that action at this time.
0 commit comments