Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 committed Nov 12, 2024
1 parent af23c2f commit 9383815
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dev": "rollup --config --watch",
"format": "pnpm --parallel format",
"lint": "pnpm --parallel lint && eslint --cache --cache-location node_modules/.eslintcache",
"test": "vitest run",
"test": "vitest run --silent",
"test:ui": "vitest --ui"
},
"devDependencies": {
Expand Down
27 changes: 11 additions & 16 deletions packages/adders/_tests/storybook/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,17 @@ const { test, variants, prepareServer } = setupTest({ storybook });
let port = 6006;

test.for(variants)('storybook loaded - %s', async (variant, { page, ...ctx }) => {
try {
const cwd = await ctx.run(variant, { storybook: {} });
const cwd = await ctx.run(variant, { storybook: {} });

const { close } = await prepareServer({
cwd,
page,
previewCommand: `pnpm storybook -p ${++port} --ci`,
buildCommand: ''
});
// kill server process when we're done
ctx.onTestFinished(async () => await close());
const { close } = await prepareServer({
cwd,
page,
previewCommand: `pnpm storybook -p ${++port} --ci`,
buildCommand: ''
});
// kill server process when we're done
ctx.onTestFinished(async () => await close());

expect(await page.$('main .sb-bar')).toBeTruthy();
expect(await page.$('#storybook-preview-wrapper')).toBeTruthy();
} catch (e) {
console.error(e.message);
console.error(e.cause);
}
expect(await page.$('main .sb-bar')).toBeTruthy();
expect(await page.$('#storybook-preview-wrapper')).toBeTruthy();
});

0 comments on commit 9383815

Please sign in to comment.