diff --git a/package.json b/package.json
index 40ea12c..1eacf9a 100644
--- a/package.json
+++ b/package.json
@@ -67,7 +67,6 @@
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"c8": "^12.0.0",
- "concat-stream": "^2.0.0",
"esbuild": "^0.28.0",
"eslint-plugin-react": "^7.0.0",
"global-jsdom": "^29.0.0",
diff --git a/test.jsx b/test.jsx
index 2dae405..0a68da4 100644
--- a/test.jsx
+++ b/test.jsx
@@ -19,10 +19,11 @@
*/
import assert from 'node:assert/strict'
+import {PassThrough} from 'node:stream'
+import {text} from 'node:stream/consumers'
import test from 'node:test'
import 'global-jsdom/register'
import {render, waitFor} from '@testing-library/react'
-import concatStream from 'concat-stream'
import {Component} from 'react'
import {renderToPipeableStream, renderToStaticMarkup} from 'react-dom/server'
import Markdown, {MarkdownAsync, MarkdownHooks} from 'react-markdown'
@@ -32,8 +33,6 @@ import remarkGfm from 'remark-gfm'
import remarkToc from 'remark-toc'
import {visit} from 'unist-util-visit'
-const decoder = new TextDecoder()
-
test('react-markdown (core)', async function (t) {
await t.test('should expose the public api', async function () {
assert.deepEqual(Object.keys(await import('react-markdown')).sort(), [
@@ -1100,37 +1099,29 @@ test('MarkdownAsync', async function (t) {
})
await t.test('should support `MarkdownAsync` (2)', async function () {
- return new Promise(function (resolve, reject) {
- renderToPipeableStream(
a
') - resolve() - }) - ) - .on('error', reject) - }) + const stream = new PassThrough() + + renderToPipeableStream(a
') }) await t.test( 'should support async plugins w/ `MarkdownAsync` (`rehype-starry-night`)', async function () { - return new Promise(function (resolve) { - renderToPipeableStream( -console.log(3.14)\n'
- )
- resolve()
- })
- )
- })
+ const stream = new PassThrough()
+
+ renderToPipeableStream(
+ console.log(3.14)\n'
+ )
}
)
})