license import './index' ; import * as tf from '@tensorflow/tfjs-core' ; import * as jasmine_util from '@tensorflow/tfjs-core/dist/jasmine_util' ; Error . stackTraceLimit = Infinity ; const jasmineCtor = require ( 'jasmine' ) ; process . on ( 'unhandledRejection' , e => { throw e ; } ) ; jasmine_util . setTestEnvs ( [ { name : 'test-tensorflow' , backendName : 'headless-nodegl' , flags : { } } ] ) ; const IGNORE_LIST = [ 'time cpu test-tensorflow {} simple upload' , 'sparseToDense test-tensorflow {} should work with 0-sized tensors' , 'fromPixels, mock canvas test-tensorflow {} accepts a canvas-like element, numChannels=4' , 'fromPixels, mock canvas test-tensorflow {} accepts a canvas-like element' ] ; const runner = new jasmineCtor ( ) ; runner . loadConfig ( { spec_files : [ 'src/**/*_test.ts' , 'node_modules/@tensorflow/tfjs-core/dist/**/*_test.js' ] , random : false } ) ; if ( process . env . JASMINE_SEED ) { runner . seed ( process . env . JASMINE_SEED ) ; } const env = jasmine . getEnv ( ) ; env . specFilter = spec => { for ( let i = 0 ; i < IGNORE_LIST . length ; ++ i ) { if ( spec . getFullName ( ) . indexOf ( IGNORE_LIST [ i ] ) > - 1 ) { return false ; } } return true ; } ; console . log ( `Running tests with the following GL info` ) ; const gl = ( tf . backend ( ) as tf . webgl . MathBackendWebGL ) . getGPGPUContext ( ) . gl ; console . log ( `  GL_VERSION: ${ gl . getParameter ( gl . VERSION ) }` ) ; console . log ( `  GL_RENDERER: ${ gl . getParameter ( gl . RENDERER ) }` ) ; runner . execute ( ) ;