Skip to content

Commit

Permalink
more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed May 4, 2022
1 parent 380f815 commit 3bcda8e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
diff --git a/bin/test-storybook.js b/bin/test-storybook.js
index 94f443455ca897b28302867cf69786d763652848..c03ba866e4893cf8075437c769edd36a5790763c 100644
index 94f443455ca897b28302867cf69786d763652848..dbf79acd7dd9c0a813b0fa1679d4b57b4e495ee4 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();
@@ -65,6 +65,7 @@ async function executeJestPlaywright(args) {
: path.resolve(__dirname, '../playwright/test-runner-jest.config.js');

argv.push('--config', jestConfigPath);
+ argv.push('--debug');

await jest.run(argv);
}
@@ -99,6 +100,7 @@ async function fetchStoriesJson(url) {
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'));
+ console.log(tmpFile, fs.readFileSync(tmpFile, 'utf-8'));
});
} catch (err) {
console.error(`Failed to fetch stories.json from ${storiesJsonUrl}`);
@@ -162,6 +164,7 @@ const main = async () => {
storiesJsonTmpDir = await fetchStoriesJson(targetURL);
process.env.TEST_ROOT = storiesJsonTmpDir;
process.env.TEST_MATCH = '**/*.test.js';
+ console.log(storiesJsonTmpDir);
}

process.env.STORYBOOK_CONFIG_DIR = runnerOptions.configDir;
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3741,7 +3741,7 @@ __metadata:

"@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"
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=38762d&locator=example-lit-ts%40workspace%3Aexamples%2Flit-ts"
dependencies:
"@storybook/csf": 0.0.2--canary.87bc651.0
"@storybook/csf-tools": ^6.4.14
Expand All @@ -3757,7 +3757,7 @@ __metadata:
jest: ">=26.6.3"
bin:
test-storybook: bin/test-storybook.js
checksum: 57c5a1b896a2751523231be55389db48dca28a6988ccfd73de2785a0a587e4ddd13d3b73d79b5fdb71940c4e01e9fc47adb4bc56fee5649f9699877452038ea4
checksum: 02f903d6c42c8c13c232f93e3480d5dfd1a21661792bb5fbe573a8a8b96b5dca067e78af59c2253aec11c1cc9f09c84e439beaec754dfa14ee2add3bf4d44134
languageName: node
linkType: hard

Expand Down

0 comments on commit 3bcda8e

Please sign in to comment.