#JSDOM plus client slide island testing

3 messages · Page 1 of 1 (latest)

low pollen
#

Hi

I'm trying to make client side tests using JSDOM.

First i generate response using Containers API, then inject response text into JSDOM page.
https://stackblitz.com/edit/jsdom-astro-svelte?file=test%2Fnode-env.test.ts&on=stackblitz
(npm run test)

I extracted body and posted it as jsfiddle: https://jsfiddle.net/3upLh58j/

So the problem is that this code doesn't have access to astro:scripts (in both JSDOM and jsfiddle)

How would you go about injecting those scripts into JSDOM instance?

Rik

Run official live example code for Astro Minimal, created by Withastro on StackBlitz

low pollen
versed condor
#

Hi, jumping in here as part of the monthly support patrol call. We're doing some spring cleaning and were wondering if we could mark this as solved. Are you still facing this issue?