From 126c9ec57d4f272870787bb31753fa267f0e1119 Mon Sep 17 00:00:00 2001 From: Cody Kaup Date: Wed, 16 Oct 2024 15:42:20 -0500 Subject: [PATCH] Fix timing issue in getStorybookInfo 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 3392b1429..9b3453f59 100644 --- a/node-src/lib/getStorybookInfo.test.ts +++ b/node-src/lib/getStorybookInfo.test.ts @@ -31,7 +31,9 @@ describe('getStorybookInfo', () => { expect(sbInfo).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), builder: { name: '@storybook/react-webpack5', packageVersion: expect.any(String) }, })