{
// Write it to disk, load it with native Node ESM, then delete the file.
const tmpFileUrl = new URL(`markdoc.config.timestamp-${Date.now()}.mjs`, root);
fs.writeFileSync(tmpFileUrl, code);
diff --git a/packages/integrations/markdoc/test/fixtures/render-null/markdoc.config.mjs b/packages/integrations/markdoc/test/fixtures/render-null/markdoc.config.mjs
index 2f87f6de0bc13..01082bfacd020 100644
--- a/packages/integrations/markdoc/test/fixtures/render-null/markdoc.config.mjs
+++ b/packages/integrations/markdoc/test/fixtures/render-null/markdoc.config.mjs
@@ -1,26 +1,10 @@
-import { defineMarkdocConfig } from '@astrojs/markdoc/config';
+import { defineMarkdocConfig, nodes } from '@astrojs/markdoc/config';
export default defineMarkdocConfig({
nodes: {
document: {
+ ...nodes.document,
render: null,
-
- // Defaults from `Markdoc.nodes.document`
- children: [
- 'heading',
- 'paragraph',
- 'image',
- 'table',
- 'tag',
- 'fence',
- 'blockquote',
- 'comment',
- 'list',
- 'hr',
- ],
- attributes: {
- frontmatter: { render: false },
- },
}
}
})
diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.mjs b/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts
similarity index 100%
rename from packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.mjs
rename to packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts
diff --git a/packages/integrations/markdoc/test/fixtures/render-with-config/markdoc.config.mjs b/packages/integrations/markdoc/test/fixtures/render-with-config/markdoc.config.ts
similarity index 100%
rename from packages/integrations/markdoc/test/fixtures/render-with-config/markdoc.config.mjs
rename to packages/integrations/markdoc/test/fixtures/render-with-config/markdoc.config.ts
diff --git a/packages/integrations/mdx/test/astro-content-css.test.js b/packages/integrations/mdx/test/astro-content-css.test.js
deleted file mode 100644
index 712aaf54771b0..0000000000000
--- a/packages/integrations/mdx/test/astro-content-css.test.js
+++ /dev/null
@@ -1,49 +0,0 @@
-import { expect } from 'chai';
-import * as cheerio from 'cheerio';
-import { loadFixture } from '../../../astro/test/test-utils.js';
-import mdx from '@astrojs/mdx';
-
-describe('build css from the component', async () => {
- let fixture;
-
- before(async () => {
- fixture = await loadFixture({
- root: new URL('./fixtures/astro-content-css/', import.meta.url),
- integrations: [mdx()],
- });
- await fixture.build();
- });
-
- describe('Build', () => {
- before(async () => {
- await fixture.build();
- });
-
- it('including css and js from the component in pro', async () => {
- const html = await fixture.readFile('/index.html');
- const $ = cheerio.load(html);
- expect($('link[href$=".css"]').attr('href')).to.match(/^\/_astro\//);
- expect($('script[src$=".js"]').attr('src')).to.match(/^\/_astro\//);
- });
- });
-
- describe('Dev', () => {
- let devServer;
- before(async () => {
- devServer = await fixture.startDevServer();
- });
-
- after(async () => {
- devServer.stop();
- });
-
- it('ncluding css and js from the component in Dev', async () => {
- let res = await fixture.fetch(`/`);
- expect(res.status).to.equal(200);
- const html = await res.text();
- const $ = cheerio.load(html);
- expect($.html()).to.include('CornflowerBlue');
- expect($('script[src$=".js"]').attr('src')).to.include('astro');
- });
- });
-});
diff --git a/packages/integrations/mdx/test/fixtures/astro-content-css/astro.config.mjs b/packages/integrations/mdx/test/fixtures/astro-content-css/astro.config.mjs
deleted file mode 100644
index b67da09a917ed..0000000000000
--- a/packages/integrations/mdx/test/fixtures/astro-content-css/astro.config.mjs
+++ /dev/null
@@ -1,11 +0,0 @@
-import { defineConfig } from 'astro/config';
-
-import mdx from "@astrojs/mdx";
-
-// https://astro.build/config
-export default defineConfig({
- build: {
- format: 'file'
- },
- integrations: [mdx()]
-});
diff --git a/packages/integrations/mdx/test/fixtures/astro-content-css/package.json b/packages/integrations/mdx/test/fixtures/astro-content-css/package.json
deleted file mode 100644
index 8d436998c640e..0000000000000
--- a/packages/integrations/mdx/test/fixtures/astro-content-css/package.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "name": "@test/astro-content-css",
- "version": "0.0.0",
- "private": true,
- "dependencies": {
- "astro": "workspace:*",
- "@astrojs/mdx": "workspace:*"
- }
-}
diff --git a/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/config.ts b/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/config.ts
deleted file mode 100644
index bf1a34c0528f7..0000000000000
--- a/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/config.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-// 1. Import utilities from `astro:content`
-import { z, defineCollection } from 'astro:content';
-// 2. Define a schema for each collection you'd like to validate.
-const dynamicCollection = defineCollection({
- schema: z.object({
- title: z.string(),
- }),
-});
-// 3. Export a single `collections` object to register your collection(s)
-export const collections = {
- dynamic: dynamicCollection,
-};
diff --git a/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/dynamic/FirstComponentWithJS.astro b/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/dynamic/FirstComponentWithJS.astro
deleted file mode 100644
index f3b588b427137..0000000000000
--- a/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/dynamic/FirstComponentWithJS.astro
+++ /dev/null
@@ -1,18 +0,0 @@
----
-const { text } = Astro.props;
----
-
-
-
-
- 1st components with js. Props: {text}. Styles. JS:
-
-
-
-
\ No newline at end of file
diff --git a/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/dynamic/first-component-with-js.mdx b/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/dynamic/first-component-with-js.mdx
deleted file mode 100644
index 0abdfbe3a4f82..0000000000000
--- a/packages/integrations/mdx/test/fixtures/astro-content-css/src/content/dynamic/first-component-with-js.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
----
-title: 'First component'
----
-
-import FirstDynamicComponentWithJS from './FirstComponentWithJS.astro';
-
-
-
-Additional text from mdx 'first-component-with-js'
diff --git a/packages/integrations/mdx/test/fixtures/astro-content-css/src/pages/index.astro b/packages/integrations/mdx/test/fixtures/astro-content-css/src/pages/index.astro
deleted file mode 100644
index 63ea9ddbb41b3..0000000000000
--- a/packages/integrations/mdx/test/fixtures/astro-content-css/src/pages/index.astro
+++ /dev/null
@@ -1,16 +0,0 @@
----
-import { getCollection } from 'astro:content';
-
-const entries = await getCollection('dynamic');
----
-
-
-
-
-
- {entries.map(async entry => {
- const { Content } = await entry.render();
- return ;
- })}
-
-
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dc021581f7cdc..a6f92fd05cee0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4216,15 +4216,6 @@ importers:
specifier: ^4.3.1
version: 4.3.1(@types/node@18.16.3)(sass@1.52.2)
- packages/integrations/mdx/test/fixtures/astro-content-css:
- dependencies:
- '@astrojs/mdx':
- specifier: workspace:*
- version: link:../../..
- astro:
- specifier: workspace:*
- version: link:../../../../../astro
-
packages/integrations/mdx/test/fixtures/css-head-mdx:
dependencies:
'@astrojs/mdx':