diff --git a/src/index.test.mjs b/src/index.test.mjs index b4d2a7a7..20dc10b9 100644 --- a/src/index.test.mjs +++ b/src/index.test.mjs @@ -4,12 +4,18 @@ import { it } from 'node:test'; import assert from 'assert'; -import { createElement, jsx } from '../cjs/index.js'; +import { createElement, Image, jsx, Video } from '../cjs/index.js'; -it('exports createElement', () => { - assert.strictEqual(typeof createElement, 'function'); +[createElement, Image, Video].forEach((func) => { + it(`exports ${func.name}`, () => { + assert.strictEqual(typeof func, 'function'); + }); }); it('exports jsx', () => { assert.strictEqual(jsx, createElement); }); + +it('exports Image', () => { + assert.strictEqual(typeof Image, 'function'); +}); diff --git a/src/index.test.ts b/src/index.test.ts index 94be51ea..e3ef360e 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -1,7 +1,7 @@ -import { createElement, jsx } from '.'; +import { Container, createElement, jsx, Rectangle, Text } from '.'; -it('exports createElement', () => { - expect(createElement).toBeInstanceOf(Function); +it.each([Container, Rectangle, Text, createElement])('exports %p', (func) => { + expect(func).toBeInstanceOf(Function); }); it('exports jsx', () => { diff --git a/src/index.ts b/src/index.ts index 931cf89e..47496ca4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1,2 @@ +export * from './components'; export { createElement, jsx } from './element';