From 350455b83dc16648d17778a74a59a089ef8a7265 Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Thu, 14 Nov 2019 14:33:22 -0800 Subject: [PATCH] Add test for -start not firing --- test/test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test.js b/test/test.js index 3af6cc1..9932b81 100644 --- a/test/test.js +++ b/test/test.js @@ -232,6 +232,14 @@ describe('auto-check element', function() { input.dispatchEvent(new InputEvent('change')) input.dispatchEvent(new InputEvent('change')) }) + + it('do not emit if essential attributes are missing', async function() { + const events = [] + checker.removeAttribute('src') + input.addEventListener('auto-check-start', event => events.push(event.type)) + triggerChange(input, 'hub') + assert.deepEqual(events, []) + }) }) })