Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Commit

Permalink
Destructed union test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wobbabits committed Dec 21, 2019
1 parent cfae128 commit 8e59eba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/runtime.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,11 @@ <h1 id="subscription-test3"></h1>
})

describe('Should be able to pass data with tagged union function.', () => {
const Msg4 = union('click')
const {match, click} = union('click')
function Component(state, send) {
return html`
<div>
<button id='send-msg4' onclick=${() => send(Msg4.click('button was clicked'))}></button>
<button id='send-msg4' onclick=${() => send(click, 'button was clicked')}></button>
<p id='click-result4'>${state}</p>
</div>
`
Expand All @@ -261,7 +261,7 @@ <h1 id="subscription-test3"></h1>
return 'no message'
},
update(state, msg) {
return Msg4.match(msg, {
return match(msg, {
'click': message => {
taggedEffectFired = message
return state
Expand Down

0 comments on commit 8e59eba

Please sign in to comment.