-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: write the test some other way to try to convince playwright
- Loading branch information
1 parent
7723c01
commit 8cbb65d
Showing
2 changed files
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
packages/astro/e2e/fixtures/custom-client-directives/client-options.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
// Hydrate directly and write the passed options to the DOM | ||
export default async (load, options) => { | ||
const hydrate = await load() | ||
document.write(`<div id="options">Passed options are: ${JSON.stringify(options.value)}</div>`) | ||
await hydrate() | ||
const hydrate = await load(); | ||
|
||
const div = document.createElement('div'); | ||
div.id = 'options'; | ||
div.textContent = `Passed options are: ${JSON.stringify(options.value)}`; | ||
document.body.appendChild(div); | ||
await hydrate(); | ||
} |