|
|
|
|
@ -15,15 +15,16 @@ export default test({
|
|
|
|
|
`
|
|
|
|
|
<button>startA</button>
|
|
|
|
|
<button>startB</button>
|
|
|
|
|
<button>settleA</button>
|
|
|
|
|
<button>settleB</button>
|
|
|
|
|
<p>A0/B0</p>
|
|
|
|
|
<div><span>1</span><span>2</span></div>
|
|
|
|
|
`
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
const [startA, startB, settleB] = target.querySelectorAll('button');
|
|
|
|
|
const [startA, startB, settleA, settleB] = target.querySelectorAll('button');
|
|
|
|
|
|
|
|
|
|
// Batch A: add key 9, then block forever on gate A.
|
|
|
|
|
// Batch A: add key 9, then block on gate A.
|
|
|
|
|
startA.click();
|
|
|
|
|
await tick();
|
|
|
|
|
|
|
|
|
|
@ -32,18 +33,31 @@ export default test({
|
|
|
|
|
await tick();
|
|
|
|
|
|
|
|
|
|
// Settle B first so B commits while A is still pending.
|
|
|
|
|
// Without the fix this throws reading `.e` of undefined and leaves a/b stuck.
|
|
|
|
|
settleB.click();
|
|
|
|
|
await tick();
|
|
|
|
|
assert.htmlEqual(
|
|
|
|
|
target.innerHTML,
|
|
|
|
|
`
|
|
|
|
|
<button>startA</button>
|
|
|
|
|
<button>startB</button>
|
|
|
|
|
<button>settleA</button>
|
|
|
|
|
<button>settleB</button>
|
|
|
|
|
<p>A0/B0</p>
|
|
|
|
|
<div><span>1</span><span>2</span></div>
|
|
|
|
|
`
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
settleA.click();
|
|
|
|
|
await tick();
|
|
|
|
|
assert.htmlEqual(
|
|
|
|
|
target.innerHTML,
|
|
|
|
|
`
|
|
|
|
|
<button>startA</button>
|
|
|
|
|
<button>startB</button>
|
|
|
|
|
<button>settleA</button>
|
|
|
|
|
<button>settleB</button>
|
|
|
|
|
<p>A0/B1</p>
|
|
|
|
|
<div></div>
|
|
|
|
|
<p>A1/B1</p>
|
|
|
|
|
<div><span>9</span></div>
|
|
|
|
|
`
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|