From 11e24eedf9ecec091c2ddcd8a43b040131cb8c4b Mon Sep 17 00:00:00 2001 From: Cody Kaup Date: Thu, 12 Sep 2024 15:40:44 -0500 Subject: [PATCH] Fix flaky missing dependency test --- node-src/lib/getStorybookInfo.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node-src/lib/getStorybookInfo.test.ts b/node-src/lib/getStorybookInfo.test.ts index 4b17cab46..3317f1603 100644 --- a/node-src/lib/getStorybookInfo.test.ts +++ b/node-src/lib/getStorybookInfo.test.ts @@ -81,7 +81,9 @@ describe('getStorybookInfo', () => { await expect(getStorybookInfo(context)).resolves.toEqual( // We're getting the result of tracing chromatic-cli's node_modules here. expect.objectContaining({ - viewLayer: 'react', + // We're currently using `react` and `@storybook/react-webpack5` so the we can end up with + // either one based on when those promises resolve. + viewLayer: expect.stringMatching(/(react|@storybook\/react-webpack5)/), version: expect.any(String), addons: [ {