File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,17 @@ import { testEachModel } from "../env";
22import { createModel } from "../utils" ;
33import { makeTestSound } from "../make-test-sound" ;
44
5+ const times = 500 ;
6+
57testEachModel (
6- " speak 1000 times" ,
8+ ` speak ${ times } times` ,
79 async ( { app, model : { modelJsonWithUrl, hitTests } } ) => {
810 const model = await createModel ( modelJsonWithUrl ) ;
911 model . update ( 100 ) ;
1012 app . stage . addChild ( model ) ;
1113 app . renderer . resize ( model . width , model . height ) ;
1214 app . render ( ) ;
13- for ( let i = 0 ; i < 1000 ; i ++ ) {
15+ for ( let i = 0 ; i < times ; i ++ ) {
1416 await new Promise < void > ( ( resolve , reject ) => {
1517 const duration = Math . random ( ) * 0.01 ;
1618 model . speak ( makeTestSound ( undefined , 0.1 , duration ) , {
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ export default defineConfig(({ command, mode }) => {
100100 ] ,
101101 test : {
102102 include : [ "**/*.test.ts" , "**/*.test.js" ] ,
103+ testTimeout : 10 * 1000 ,
103104 browser : {
104105 enabled : true ,
105106 name : "chrome" ,
@@ -120,6 +121,18 @@ export default defineConfig(({ command, mode }) => {
120121 override async sort ( files : Parameters < BaseSequencer [ "sort" ] > [ 0 ] ) {
121122 files = await super . sort ( files ) ;
122123
124+ // stability tests are slow, it will drag others leg behind
125+ // so we put them at the last
126+ const stabilityTestFiles : typeof files = [ ] ;
127+
128+ files = files . filter ( ( [ project , file ] ) => {
129+ if ( file . includes ( "stability" ) ) {
130+ stabilityTestFiles . push ( [ project , file ] ) ;
131+ return false ;
132+ }
133+ return true ;
134+ } ) ;
135+
123136 const bundleTestFiles : typeof files = [ ] ;
124137
125138 files = files . filter ( ( [ project , file ] ) => {
@@ -130,7 +143,7 @@ export default defineConfig(({ command, mode }) => {
130143 return true ;
131144 } ) ;
132145
133- return [ ...files , ...bundleTestFiles ] ;
146+ return [ ...files , ...stabilityTestFiles ] ;
134147 }
135148 } ,
136149 } ,
You can’t perform that action at this time.
0 commit comments