@@ -381,6 +381,60 @@ describe('SERIALIZATION OF NUMBERS', () => {
381381 ) ;
382382 } ) ;
383383
384+ test ( 'scientific notation within avoidExponentsInRange' , ( ) => {
385+ const result = ce . box ( 1 / 7000000 ) . toLatex ( {
386+ notation : 'scientific' ,
387+ } ) ;
388+ expect ( result ) . toMatchInlineSnapshot (
389+ `1.428\\,571\\,428\\,571\\,428\\,5\\cdot10^{-7}`
390+ ) ;
391+ } ) ;
392+
393+ test ( 'scientific notation outside avoidExponentsInRange' , ( ) => {
394+ const result = ce . box ( 1 / 70000000 ) . toLatex ( {
395+ notation : 'scientific' ,
396+ } ) ;
397+ expect ( result ) . toMatchInlineSnapshot (
398+ `1.428\\,571\\,428\\,571\\,428\\,6\\cdot10^{-8}`
399+ ) ;
400+ } ) ;
401+
402+ test ( 'auto notation within avoidExponentsInRange' , ( ) => {
403+ const result = ce . box ( 1 / 7000000 ) . toLatex ( {
404+ notation : 'auto' ,
405+ } ) ;
406+ expect ( result ) . toMatchInlineSnapshot (
407+ `0.000\\,000\\,142\\,857\\,142\\,857\\,142\\,85`
408+ ) ;
409+ } ) ;
410+
411+ test ( 'auto notation outside avoidExponentsInRange' , ( ) => {
412+ const result = ce . box ( 1 / 70000000 ) . toLatex ( {
413+ notation : 'auto' ,
414+ } ) ;
415+ expect ( result ) . toMatchInlineSnapshot (
416+ `14\\,285\\,714\\,285\\,714\\,286\\cdot10^{-24}`
417+ ) ;
418+ } ) ;
419+
420+ test ( 'adaptiveScientific notation within avoidExponentsInRange' , ( ) => {
421+ const result = ce . box ( 1 / 7000000 ) . toLatex ( {
422+ notation : 'adaptiveScientific' ,
423+ } ) ;
424+ expect ( result ) . toMatchInlineSnapshot (
425+ `0.000\\,000\\,142\\,857\\,142\\,857\\,142\\,85`
426+ ) ;
427+ } ) ;
428+
429+ test ( 'adaptiveScientific notation outside avoidExponentsInRange' , ( ) => {
430+ const result = ce . box ( 1 / 70000000 ) . toLatex ( {
431+ notation : 'adaptiveScientific' ,
432+ } ) ;
433+ expect ( result ) . toMatchInlineSnapshot (
434+ `1.428\\,571\\,428\\,571\\,428\\,6\\cdot10^{-8}`
435+ ) ;
436+ } ) ;
437+
384438 test ( 'Number with repeating pattern' , ( ) => {
385439 const format = ( num : string , p : string ) =>
386440 ce . box ( { num } ) . toLatex ( {
0 commit comments