Skip to content

guides/fix example heading for WTR and content as data snippet#196

Merged
thescientist13 merged 1 commit intomainfrom
guide/fix-wtr-content-as-data-example-heading
Mar 23, 2025
Merged

guides/fix example heading for WTR and content as data snippet#196
thescientist13 merged 1 commit intomainfrom
guide/fix-wtr-content-as-data-example-heading

Conversation

@thescientist13
Copy link
Copy Markdown
Member

Related Issue

Noticed when trying to follow this example for WTR <> Content as data integration, and copying the window.fetch snippet, the code snippet heading implied this should go in web-test-runner.config.js
Screenshot 2025-03-23 at 3 51 47 PM

which leads to this error if you do

➜  www.owenascode.dev git:(feature/issue-10-header-component) ✗ npm run test

> [email protected] test
> wtr

ReferenceError: window is not defined
    at file:///Users/owenbuckley/Workspace/github/www.owenascode.dev/web-test-runner.config.js:8:1
    at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26)
    at async importConfig (/Users/owenbuckley/Workspace/github/www.owenascode.dev/node_modules/.pnpm/@[email protected]/node_modules/@web/config-loader/src/importConfig.js:17:20)
    at async readFileConfig (/Users/owenbuckley/Workspace/github/www.owenascode.dev/node_modules/.pnpm/@[email protected]/node_modules/@web/test-runner/dist/config/readFileConfig.js:13:16)
    at async startTestRunner (/Users/owenbuckley/Workspace/github/www.owenascode.dev/node_modules/.pnpm/@[email protected]/node_modules/@web/test-runner/dist/startTestRunner.js:20:15)

Looking closer at the snippet, it becomes obvious the window.fetch snippet is supposed to go into the test case file itself.

Summary of Changes

  1. Fixed the snippet heading to indicate this is for a test file (not the WTR config file 😅 )

@thescientist13 thescientist13 added the docs Greenwood specific content like docs and guides label Mar 23, 2025
@thescientist13 thescientist13 changed the title guide/fix example heading for WTR and content as data guide/fix example heading for WTR and content as data snippet Mar 23, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 23, 2025

Deploy Preview for super-tapioca-5987ce ready!

Name Link
🔨 Latest commit df13c0d
🔍 Latest deploy log https://app.netlify.com/sites/super-tapioca-5987ce/deploys/67e066825cbeaf000884de68
😎 Deploy Preview https://deploy-preview-196--super-tapioca-5987ce.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@thescientist13 thescientist13 changed the title guide/fix example heading for WTR and content as data snippet guides/fix example heading for WTR and content as data snippet Mar 23, 2025
@thescientist13 thescientist13 merged commit 51b74c5 into main Mar 23, 2025
5 checks passed
@thescientist13 thescientist13 deleted the guide/fix-wtr-content-as-data-example-heading branch March 23, 2025 20:06
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in [Greenwood] Website Redesign and Relaunch Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Greenwood specific content like docs and guides

Projects

Development

Successfully merging this pull request may close these issues.

1 participant