@@ -2,7 +2,7 @@ import { it, describe, expect, afterEach, vi } from 'vitest';
22import { gray } from 'colorette' ;
33import { render , cleanup as cleanupMountedReactTrees , act } from '@testing-library/react' ;
44import { Iterate , It , type IterationResult } from '../../src/index.js' ;
5- import { IterableChannelTestHelper } from '../utils/IterableChannelTestHelper .js' ;
5+ import { IteratorChannelTestHelper } from '../utils/IteratorChannelTestHelper .js' ;
66
77afterEach ( ( ) => {
88 cleanupMountedReactTrees ( ) ;
@@ -18,7 +18,7 @@ describe('`Iterate` component', () => {
1818 'When used in the no-render-function form and given an iterable that yields a value will render correctly'
1919 ) ,
2020 async ( ) => {
21- const channel = new IterableChannelTestHelper < string > ( ) ;
21+ const channel = new IteratorChannelTestHelper < string > ( ) ;
2222
2323 const rendered = render ( < Iterate > { channel } </ Iterate > ) ;
2424
@@ -47,7 +47,7 @@ describe('`Iterate` component', () => {
4747 'When used in the no-render-function form and given an iterable that yields a value in conjunction with some initial value will render correctly'
4848 ) ,
4949 async ( ) => {
50- const channel = new IterableChannelTestHelper < string > ( ) ;
50+ const channel = new IteratorChannelTestHelper < string > ( ) ;
5151
5252 const rendered = render ( < Iterate initialValue = "_" > { channel } </ Iterate > ) ;
5353
@@ -136,7 +136,7 @@ describe('`Iterate` component', () => {
136136 ) ;
137137
138138 it ( gray ( 'When given an iterable that yields a value will render correctly' ) , async ( ) => {
139- const channel = new IterableChannelTestHelper < string > ( ) ;
139+ const channel = new IteratorChannelTestHelper < string > ( ) ;
140140 let timesRerendered = 0 ;
141141 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
142142
@@ -180,7 +180,7 @@ describe('`Iterate` component', () => {
180180 'When given an iterable that yields a value in conjunction with some initial value will render correctly'
181181 ) ,
182182 async ( ) => {
183- const channel = new IterableChannelTestHelper < string > ( ) ;
183+ const channel = new IteratorChannelTestHelper < string > ( ) ;
184184 let timesRerendered = 0 ;
185185 let lastRenderFnInput : undefined | IterationResult < string > ;
186186
@@ -221,7 +221,7 @@ describe('`Iterate` component', () => {
221221 ) ;
222222
223223 it ( gray ( 'When given an iterable that yields multiple values will render correctly' ) , async ( ) => {
224- const channel = new IterableChannelTestHelper < string > ( ) ;
224+ const channel = new IteratorChannelTestHelper < string > ( ) ;
225225 let timesRerendered = 0 ;
226226 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
227227
@@ -331,7 +331,7 @@ describe('`Iterate` component', () => {
331331 it (
332332 gray ( 'When given an iterable that yields a value and then completes will render correctly' ) ,
333333 async ( ) => {
334- const channel = new IterableChannelTestHelper < string > ( ) ;
334+ const channel = new IteratorChannelTestHelper < string > ( ) ;
335335 let timesRerendered = 0 ;
336336 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
337337
@@ -446,7 +446,7 @@ describe('`Iterate` component', () => {
446446 it (
447447 gray ( 'When given an iterable that yields a value and then errors will render correctly' ) ,
448448 async ( ) => {
449- const channel = new IterableChannelTestHelper < string > ( ) ;
449+ const channel = new IteratorChannelTestHelper < string > ( ) ;
450450 let timesRerendered = 0 ;
451451 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
452452
@@ -498,8 +498,8 @@ describe('`Iterate` component', () => {
498498 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
499499
500500 const [ channel1 , channel2 ] = [
501- new IterableChannelTestHelper < string > ( ) ,
502- new IterableChannelTestHelper < string > ( ) ,
501+ new IteratorChannelTestHelper < string > ( ) ,
502+ new IteratorChannelTestHelper < string > ( ) ,
503503 ] ;
504504
505505 const [ channelReturnSpy1 , channelReturnSpy2 ] = [
@@ -587,7 +587,7 @@ describe('`Iterate` component', () => {
587587 it ( gray ( 'When unmounted will close the last active iterator it held' ) , async ( ) => {
588588 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
589589
590- const channel = new IterableChannelTestHelper < string > ( ) ;
590+ const channel = new IteratorChannelTestHelper < string > ( ) ;
591591 const channelReturnSpy = vi . spyOn ( channel , 'return' ) ;
592592
593593 const buildTestContent = ( value : AsyncIterable < string > ) => {
@@ -675,7 +675,7 @@ describe('`Iterate` component', () => {
675675 async ( ) => {
676676 let timesRerendered = 0 ;
677677 let lastRenderFnInput : undefined | IterationResult < string | undefined > ;
678- const channel = new IterableChannelTestHelper < string > ( ) ;
678+ const channel = new IteratorChannelTestHelper < string > ( ) ;
679679
680680 const rendered = render (
681681 < Iterate value = { channel } >
0 commit comments