File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ var tape = require ( 'tape' ) ;
2+ var mjAPI = require ( "../lib/main.js" ) ;
3+
4+ tape ( 'basic configuration: check fontURL' , function ( t ) {
5+ t . plan ( 2 ) ;
6+
7+ var tex = 'a' ;
8+ mjAPI . typeset ( {
9+ math : tex ,
10+ format : "TeX" ,
11+ css : true
12+ } , function ( result , data ) {
13+ t . ok ( result . css . indexOf ( 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/fonts/HTML-CSS' ) > - 1 , 'Default fontURL' ) ;
14+ } ) ;
15+ // reconfigure
16+ mjAPI . typeset ( {
17+ math : ''
18+ } , function ( ) {
19+ mjAPI . config ( {
20+ fontURL : 'https://example.com'
21+ } ) ;
22+ mjAPI . start ( ) ;
23+ } )
24+ mjAPI . typeset ( {
25+ math : tex ,
26+ format : "TeX" ,
27+ css : true ,
28+ } , function ( result , data ) {
29+ t . ok ( result . css . indexOf ( 'https://example.com' ) > - 1 , 'Configuring fontURL' ) ;
30+ } ) ;
31+ } ) ;
You can’t perform that action at this time.
0 commit comments