Skip to content

Commit

Permalink
test: update the main export test to include new hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
trezy committed Aug 1, 2024
1 parent b489b83 commit d8add6c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/unit/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ import {
it,
} from 'vitest';
import { Application } from '../../src/components/Application.ts';
import { UseAssetsStatus } from '../../src/constants/UseAssetsStatus.ts';
import { createRoot } from '../../src/core/createRoot.ts';
import { extend } from '../../src/helpers/extend.ts';
import { useApp } from '../../src/hooks/useApp.ts';
import { useApplication } from '../../src/hooks/useApplication.ts';
import { useAsset } from '../../src/hooks/useAsset.ts';
import { useAssets } from '../../src/hooks/useAssets.ts';
import { useExtend } from '../../src/hooks/useExtend.ts';
import { useSuspenseAssets } from '../../src/hooks/useSuspenseAssets.ts';
import { useTick } from '../../src/hooks/useTick.ts';
import * as PixiReact from '../../src/index.ts';

Expand Down Expand Up @@ -51,12 +54,30 @@ describe('exports', () =>
.and.to.equal(useAsset);
});

it('exports the `useAssets()` hook', () =>
{
expect(PixiReact).to.have.property('useAssets')
.and.to.equal(useAssets);
});

it('exports the `UseAssetsStatus()` hook', () =>
{
expect(PixiReact).to.have.property('UseAssetsStatus')
.and.to.equal(UseAssetsStatus);
});

it('exports the `useExtend()` hook', () =>
{
expect(PixiReact).to.have.property('useExtend')
.and.to.equal(useExtend);
});

it('exports the `useSuspenseAssets()` hook', () =>
{
expect(PixiReact).to.have.property('useSuspenseAssets')
.and.to.equal(useSuspenseAssets);
});

it('exports the `useTick()` hook', () =>
{
expect(PixiReact).to.have.property('useTick')
Expand All @@ -72,8 +93,11 @@ describe('exports', () =>
'useApp',
'useApplication',
'useAsset',
'useAssets',
'UseAssetsStatus',
'useExtend',
'useTick',
'useSuspenseAssets',
);
});
});

0 comments on commit d8add6c

Please sign in to comment.