Skip to content

Commit

Permalink
Debug time
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Apr 28, 2022
1 parent 11d6bcb commit 380f815
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/lit-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@storybook/addon-essentials": "^6.5.0-alpha.58",
"@storybook/addon-links": "^6.5.0-alpha.58",
"@storybook/builder-vite": "workspace:*",
"@storybook/test-runner": "^0.0.4",
"@storybook/test-runner": "patch:@storybook/test-runner@npm:0.0.4#patches/@storybook-test-runner-npm-0.0.4-37f6d4c435",
"@storybook/web-components": "^6.5.0-alpha.58",
"http-server": "^14.1.0",
"jest": "^27.5.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/bin/test-storybook.js b/bin/test-storybook.js
index 94f443455ca897b28302867cf69786d763652848..c03ba866e4893cf8075437c769edd36a5790763c 100644
--- a/bin/test-storybook.js
+++ b/bin/test-storybook.js
@@ -94,11 +94,12 @@ async function fetchStoriesJson(url) {
const res = await fetch(storiesJsonUrl);
const json = await res.text();
const titleIdToTest = transformPlaywrightJson(json);
-
+ console.log(json);
tmpDir = tempy.directory();
Object.entries(titleIdToTest).forEach(([titleId, test]) => {
const tmpFile = path.join(tmpDir, `${titleId}.test.js`);
fs.writeFileSync(tmpFile, test);
+ console.log(fs.readFileSync(tmpFile, 'utf-8'));
});
} catch (err) {
console.error(`Failed to fetch stories.json from ${storiesJsonUrl}`);
26 changes: 24 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3717,7 +3717,7 @@ __metadata:
languageName: node
linkType: hard

"@storybook/test-runner@npm:^0.0.4":
"@storybook/test-runner@npm:0.0.4, @storybook/test-runner@npm:^0.0.4":
version: 0.0.4
resolution: "@storybook/test-runner@npm:0.0.4"
dependencies:
Expand All @@ -3739,6 +3739,28 @@ __metadata:
languageName: node
linkType: hard

"@storybook/test-runner@patch:@storybook/test-runner@npm:0.0.4#patches/@storybook-test-runner-npm-0.0.4-37f6d4c435::locator=example-lit-ts%40workspace%3Aexamples%2Flit-ts":
version: 0.0.4
resolution: "@storybook/test-runner@patch:@storybook/test-runner@npm%3A0.0.4#patches/@storybook-test-runner-npm-0.0.4-37f6d4c435::version=0.0.4&hash=681e16&locator=example-lit-ts%40workspace%3Aexamples%2Flit-ts"
dependencies:
"@storybook/csf": 0.0.2--canary.87bc651.0
"@storybook/csf-tools": ^6.4.14
commander: ^9.0.0
global: ^4.4.0
is-localhost-ip: ^1.4.0
jest-playwright-preset: ^1.7.0
jest-watch-typeahead: ^1.0.0
node-fetch: ^2
playwright: ^1.14.0
tempy: ^1.0.1
peerDependencies:
jest: ">=26.6.3"
bin:
test-storybook: bin/test-storybook.js
checksum: 57c5a1b896a2751523231be55389db48dca28a6988ccfd73de2785a0a587e4ddd13d3b73d79b5fdb71940c4e01e9fc47adb4bc56fee5649f9699877452038ea4
languageName: node
linkType: hard

"@storybook/theming@npm:6.4.22":
version: 6.4.22
resolution: "@storybook/theming@npm:6.4.22"
Expand Down Expand Up @@ -8893,7 +8915,7 @@ __metadata:
"@storybook/addon-essentials": ^6.5.0-alpha.58
"@storybook/addon-links": ^6.5.0-alpha.58
"@storybook/builder-vite": "workspace:*"
"@storybook/test-runner": ^0.0.4
"@storybook/test-runner": "patch:@storybook/test-runner@npm:0.0.4#patches/@storybook-test-runner-npm-0.0.4-37f6d4c435"
"@storybook/web-components": ^6.5.0-alpha.58
http-server: ^14.1.0
jest: ^27.5.1
Expand Down

0 comments on commit 380f815

Please sign in to comment.