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

Commit 8e59eba

Browse files
committed
Destructed union test.
1 parent cfae128 commit 8e59eba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/runtime.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ <h1 id="subscription-test3"></h1>
246246
})
247247

248248
describe('Should be able to pass data with tagged union function.', () => {
249-
const Msg4 = union('click')
249+
const {match, click} = union('click')
250250
function Component(state, send) {
251251
return html`
252252
<div>
253-
<button id='send-msg4' onclick=${() => send(Msg4.click('button was clicked'))}></button>
253+
<button id='send-msg4' onclick=${() => send(click, 'button was clicked')}></button>
254254
<p id='click-result4'>${state}</p>
255255
</div>
256256
`
@@ -261,7 +261,7 @@ <h1 id="subscription-test3"></h1>
261261
return 'no message'
262262
},
263263
update(state, msg) {
264-
return Msg4.match(msg, {
264+
return match(msg, {
265265
'click': message => {
266266
taggedEffectFired = message
267267
return state

0 commit comments

Comments
 (0)