@@ -267,35 +267,26 @@ function makeScatterGeo(spec) {
267267
268268
269269tests . forEach ( function ( spec , index ) {
270- describe ( 'Performance test ' + spec . nTraces + ' ' + spec . traceType + ' | mode: ' + spec . mode + ' | size:' + spec . n , function ( ) {
270+ describe ( 'Performance test ' + spec . nTraces + ' ' + spec . traceType + ( spec . mode ? ' | mode: ' + spec . mode : '' ) + ' | size:' + spec . n , function ( ) {
271271 'use strict' ;
272272
273- var startTime , endTime ;
274-
275- beforeEach ( function ( done ) {
276- jasmine . DEFAULT_TIMEOUT_INTERVAL = 10000 ;
277-
278- var mock = generateMock ( spec ) ;
279-
280- startTime = performance . now ( ) ;
273+ samples . forEach ( function ( t ) {
274+ it ( 'turn: ' + t , function ( ) {
275+ var startTime , endTime ;
281276
282- // Wait for actual rendering to complete
283- requestAnimationFrame ( function ( ) {
284277 requestAnimationFrame ( function ( ) {
285- endTime = performance . now ( ) ;
286- done ( ) ;
278+ // Wait for actual rendering instead of promise
279+ requestAnimationFrame ( function ( ) {
280+ endTime = performance . now ( ) ;
281+ } ) ;
287282 } ) ;
288- } ) ;
289283
290- Plotly . newPlot ( gd , mock ) ;
291- } ) ;
284+ var mock = generateMock ( spec ) ;
292285
293- afterEach ( function ( done ) {
294- delay ( 100 ) ( ) . then ( done ) ;
295- } ) ;
286+ startTime = performance . now ( ) ;
287+
288+ Plotly . newPlot ( gd , mock ) ;
296289
297- samples . forEach ( function ( t ) {
298- it ( 'turn: ' + t , function ( ) {
299290 var delta = endTime - startTime ;
300291
301292 if ( t === 0 ) {
0 commit comments