@@ -267,35 +267,26 @@ function makeScatterGeo(spec) {
267
267
268
268
269
269
tests . 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 ( ) {
271
271
'use strict' ;
272
272
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 ;
281
276
282
- // Wait for actual rendering to complete
283
- requestAnimationFrame ( function ( ) {
284
277
requestAnimationFrame ( function ( ) {
285
- endTime = performance . now ( ) ;
286
- done ( ) ;
278
+ // Wait for actual rendering instead of promise
279
+ requestAnimationFrame ( function ( ) {
280
+ endTime = performance . now ( ) ;
281
+ } ) ;
287
282
} ) ;
288
- } ) ;
289
283
290
- Plotly . newPlot ( gd , mock ) ;
291
- } ) ;
284
+ var mock = generateMock ( spec ) ;
292
285
293
- afterEach ( function ( done ) {
294
- delay ( 100 ) ( ) . then ( done ) ;
295
- } ) ;
286
+ startTime = performance . now ( ) ;
287
+
288
+ Plotly . newPlot ( gd , mock ) ;
296
289
297
- samples . forEach ( function ( t ) {
298
- it ( 'turn: ' + t , function ( ) {
299
290
var delta = endTime - startTime ;
300
291
301
292
if ( t === 0 ) {
0 commit comments