From b4565aa0192d5fd2b39713fe24432e21d245cd19 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Tue, 10 Jan 2023 14:44:14 +0800 Subject: [PATCH] Only assert example counts on build/dev events --- scripts/event-log-checker.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/event-log-checker.ts b/scripts/event-log-checker.ts index bc8738fbf0c..316f4103b42 100644 --- a/scripts/event-log-checker.ts +++ b/scripts/event-log-checker.ts @@ -33,8 +33,10 @@ async function run() { assert.equal(bootEvent.payload?.eventType, eventType); const { exampleStoryCount, exampleDocsCount } = mainEvent.payload?.storyIndex || {}; - assert.equal(exampleStoryCount, 8); - assert.equal(exampleDocsCount, 3); + if (['build', 'dev'].includes(eventType)) { + assert.equal(exampleStoryCount, 8); + assert.equal(exampleDocsCount, 3); + } assert.equal(mainEvent.eventType, eventType); assert.notEqual(mainEvent.eventId, bootEvent.eventId);