Skip to content

Commit

Permalink
🧪 Adds additional test for stack direction
Browse files Browse the repository at this point in the history
  • Loading branch information
ekwoka committed Oct 12, 2023
1 parent 5ff69f7 commit 6ed3551
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/cypress/integration/scope.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ test('properly merges the datastack',
get('span').should(haveText('fizzbuzz'));
});

test('merges stack from bottom up',
[html`
<div x-data="{ foo: 'fizz' }">
<div x-data="{ foo: 'buzz', get bar() { return this.foo } }">
<span id="one" x-text="bar + foo"></span>
</div>
<span id="two" x-text="foo"></span>
</div>
`]
, ({ get }) => {
get('span#one').should(haveText('fizzbuzz'));
get('span#two').should(haveText('fizz'));
}
)

test('handles getter setter pairs',
[html`
<div x-data="{ foo: 'fizzbuzz' }">
Expand Down

0 comments on commit 6ed3551

Please sign in to comment.