File tree Expand file tree Collapse file tree
packages/tinybench-plugin/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,22 +41,6 @@ beforeEach(() => {
4141} ) ;
4242
4343describe ( "Benchmark.Suite" , ( ) => {
44- it ( "simple suite" , async ( ) => {
45- mockCore . Measurement . isInstrumented . mockReturnValue ( false ) ;
46- const bench = withCodSpeed ( new Bench ( { time : 100 } ) ) ;
47- const onComplete = vi . fn ( ) ;
48- bench . add ( "RegExp" , function ( ) {
49- / o / . test ( "Hello World!" ) ;
50- } ) ;
51- bench . getTask ( "RegExp" ) ?. addEventListener ( "complete" , onComplete ) ;
52- await bench . run ( ) ;
53-
54- expect ( onComplete ) . toHaveBeenCalled ( ) ;
55- expect ( mockCore . mongoMeasurement . start ) . not . toHaveBeenCalled ( ) ;
56- expect ( mockCore . mongoMeasurement . stop ) . not . toHaveBeenCalled ( ) ;
57- expect ( mockCore . Measurement . startInstrumentation ) . not . toHaveBeenCalled ( ) ;
58- expect ( mockCore . Measurement . stopInstrumentation ) . not . toHaveBeenCalled ( ) ;
59- } ) ;
6044 it ( "check core methods are called" , async ( ) => {
6145 mockCore . Measurement . isInstrumented . mockReturnValue ( true ) ;
6246 await withCodSpeed ( new Bench ( ) )
You can’t perform that action at this time.
0 commit comments