aboutsummaryrefslogtreecommitdiff
path: root/packages/integrations/react/test/parsed-react-children.test.js
diff options
context:
space:
mode:
authorGravatar voxel!() <voxelmc@hotmail.com> 2024-01-31 00:29:26 -0800
committerGravatar GitHub <noreply@github.com> 2024-01-31 08:29:26 +0000
commit434925437627e9d2b1941f1e56b1234eb937f231 (patch)
treebc38bc0bba93ae7625e2b5ce516b330600a55e22 /packages/integrations/react/test/parsed-react-children.test.js
parent84e9935a9179b48102c4ebc490a6de8f4726d469 (diff)
downloadastro-434925437627e9d2b1941f1e56b1234eb937f231.tar.gz
astro-434925437627e9d2b1941f1e56b1234eb937f231.tar.zst
astro-434925437627e9d2b1941f1e56b1234eb937f231.zip
chore(@astrojs/integrations/react) Migrate tests to `node:test` for `@astrojs/react` (#9899)
* Migrate Telemetry tests to node:test * Remove fallback to chai * Remove chai and mocha dependencies * Fix trailing comma * Fix pnpm-lock.yaml desync * Add back old tests with progression * Convert tests to node:test * Remove unused dependencies * Remove artifact changes * Revert more artifacts * Fix more
Diffstat (limited to 'packages/integrations/react/test/parsed-react-children.test.js')
-rw-r--r--packages/integrations/react/test/parsed-react-children.test.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/integrations/react/test/parsed-react-children.test.js b/packages/integrations/react/test/parsed-react-children.test.js
index 1c845836f..5417705f0 100644
--- a/packages/integrations/react/test/parsed-react-children.test.js
+++ b/packages/integrations/react/test/parsed-react-children.test.js
@@ -1,15 +1,16 @@
-import { expect } from 'chai';
+import assert from 'node:assert/strict';
+import { describe, it } from 'node:test';
import convert from '../vnode-children.js';
describe('experimental react children', () => {
it('has undefined as children for direct children', () => {
const [imgVNode] = convert('<img src="abc"></img>');
- expect(imgVNode.props).to.deep.include({ children: undefined });
+ assert.deepStrictEqual(imgVNode.props.children, undefined);
});
it('has undefined as children for nested children', () => {
const [divVNode] = convert('<div><img src="xyz"></img></div>');
const [imgVNode] = divVNode.props.children;
- expect(imgVNode.props).to.deep.include({ children: undefined });
+ assert.deepStrictEqual(imgVNode.props.children, undefined);
});
});