summaryrefslogtreecommitdiff
path: root/packages/integrations/mdx/test/mdx-math.test.js
diff options
context:
space:
mode:
authorGravatar Matt Kane <m@mk.gg> 2024-11-15 13:29:52 +0000
committerGravatar GitHub <noreply@github.com> 2024-11-15 13:29:52 +0000
commitaf867f3910ecd8fc04a5337f591d84f03192e3fa (patch)
treea5e5b267915c01010a1f608629c412c255d13470 /packages/integrations/mdx/test/mdx-math.test.js
parentc8f877cad2d8f1780f70045413872d5b9d32ebed (diff)
downloadastro-af867f3910ecd8fc04a5337f591d84f03192e3fa.tar.gz
astro-af867f3910ecd8fc04a5337f591d84f03192e3fa.tar.zst
astro-af867f3910ecd8fc04a5337f591d84f03192e3fa.zip
feat: experimental responsive images (#12377)
* chore: changeset * feat: add experimental responsive images config option (#12378) * feat: add experimental responsive images config option * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update config types * Move config into `images` * Move jsdocs --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * feat: add responsive image component (#12381) * feat: add experimental responsive images config option * Apply suggestions from code review Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update config types * Move config into `images` * Move jsdocs * wip: responsive image component * Improve srcset logic * Improve fixture * Lock * Update styling * Fix style prop handling * Update test (there's an extra style for images now) * Safely access the src props * Remove unused export * Handle priority images * Consolidate styles * Update tests * Comment * Refactor srcset * Avoid dupes of original image * Calculate missing dimensions * Bugfixes * Add tests * Fix test * Correct order * Lint * Fix fspath * Update test * Fix test * Conditional component per flag * Fix class concatenation * Remove logger * Rename helper * Add comments * Format * Fix markdoc tests * Add test for style tag --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * feat: add crop support to image services (#12414) * wip: add crop support to image services * Add tests * Strip crop attributes * Don't upscale * Format * Get build working properly * Changes from review * Fix jsdoc * feat: add responsive support to picture component (#12423) * feat: add responsive support to picture component * Add picture tests * Fix test * Implement own define vars * Share logic * Prevent extra astro-* class * Use dataset scoping * Revert unit test * Revert "Fix test" This reverts commit f9ec6e2938ff291037234d56f8eec76a93be0c0d. * Changes from review * docs: add docs for responsive images (#12429) * docs: add responsive images flag docs * docs: adds jsdoc for image components * chore: updates from review * Fix jsdoc * Changes from review * Add breakpoints option * typo --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Diffstat (limited to 'packages/integrations/mdx/test/mdx-math.test.js')
-rw-r--r--packages/integrations/mdx/test/mdx-math.test.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/mdx/test/mdx-math.test.js b/packages/integrations/mdx/test/mdx-math.test.js
index 5352eca68..a68c5cbe7 100644
--- a/packages/integrations/mdx/test/mdx-math.test.js
+++ b/packages/integrations/mdx/test/mdx-math.test.js
@@ -28,7 +28,7 @@ describe('MDX math', () => {
const mjxContainer = document.querySelector('mjx-container[jax="SVG"]');
assert.notEqual(mjxContainer, null);
- const mjxStyle = document.querySelector('style').innerHTML;
+ const mjxStyle = document.querySelectorAll('style')[1].innerHTML;
assert.equal(
mjxStyle.includes('mjx-container[jax="SVG"]'),
true,
@@ -62,7 +62,7 @@ describe('MDX math', () => {
const mjxContainer = document.querySelector('mjx-container[jax="CHTML"]');
assert.notEqual(mjxContainer, null);
- const mjxStyle = document.querySelector('style').innerHTML;
+ const mjxStyle = document.querySelectorAll('style')[1].innerHTML;
assert.equal(
mjxStyle.includes('mjx-container[jax="CHTML"]'),
true,