Skip to content

Commit eadca5f

Browse files
committed
fix tests
1 parent ef0add0 commit eadca5f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/core/mockup-parser.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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 = $(`

0 commit comments

Comments
 (0)