File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,10 +204,21 @@ test('set({ backgroundImage })', async (t) => {
204204 const regl = createRegl ( canvas ) ;
205205 const scatterplot = createScatterplot ( { canvas, regl } ) ;
206206
207- const backgroundImage = await createTextureFromUrl (
207+ let backgroundImage = await createTextureFromUrl (
208208 regl ,
209- 'https://picsum.photos/300/200/' ,
210- true
209+ 'https://picsum.photos/300/200/'
210+ ) ;
211+
212+ scatterplot . set ( { backgroundImage } ) ;
213+
214+ t . equal (
215+ scatterplot . get ( 'backgroundImage' ) ,
216+ backgroundImage ,
217+ 'background image should be a Regl texture'
218+ ) ;
219+
220+ backgroundImage = await scatterplot . createTextureFromUrl (
221+ 'https://picsum.photos/300/200/'
211222 ) ;
212223
213224 scatterplot . set ( { backgroundImage } ) ;
@@ -235,7 +246,7 @@ test('set({ backgroundImage })', async (t) => {
235246 t . equal (
236247 scatterplot . get ( 'backgroundImage' ) . width ,
237248 300 ,
238- 'background image should be a Regl texture '
249+ 'background image should be loaded by scatterplot '
239250 ) ;
240251} ) ;
241252
You can’t perform that action at this time.
0 commit comments