-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(types): fix up tests for new types, and add more type tests for…
… plugin APIs
- Loading branch information
1 parent
791848e
commit 308f2b5
Showing
4 changed files
with
41 additions
and
10 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
ember-headless-table/src/-private/-type-tests/table-api.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { expectTypeOf } from 'expect-type'; | ||
|
||
import { ColumnReordering } from '../../plugins/column-reordering'; | ||
import { ColumnResizing } from '../../plugins/column-resizing'; | ||
import { DataSorting } from '../../plugins/data-sorting'; | ||
|
||
import type { Table } from '[public-types]'; | ||
|
||
// We're testing types, not behaviors | ||
const x = 0 as unknown as Table<{ x: number }>; | ||
|
||
////////////////////////////// | ||
// <Table>#pluginOf | ||
expectTypeOf(x.pluginOf(DataSorting)).toEqualTypeOf<DataSorting | undefined>(); | ||
expectTypeOf(x.pluginOf(ColumnReordering)).toEqualTypeOf<ColumnReordering | undefined>(); | ||
expectTypeOf(x.pluginOf(ColumnResizing)).toEqualTypeOf<ColumnResizing | undefined>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters