From 26a240c45b039dfffb85e0a01abc7143203f70e9 Mon Sep 17 00:00:00 2001 From: Paulo Ragonha Date: Tue, 23 Jan 2018 11:36:18 +0100 Subject: [PATCH] Throw if no stories were found (#52) --- src/commands/test/run-tests.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/commands/test/run-tests.js b/src/commands/test/run-tests.js index 20598f4b..f54a1519 100644 --- a/src/commands/test/run-tests.js +++ b/src/commands/test/run-tests.js @@ -87,6 +87,9 @@ async function runTests(flatConfigurations, options) { title: 'Fetch list of stories', task: async () => { storybook = await target.getStorybook(); + if (storybook.length === 0) { + throw new Error('Error: No stories were found.'); + } }, }, ...Object.values(