77 * We compare the exact output.
88 */
99
10- describe ( 'Standard Text' , function ( ) {
11- it ( 'should load' , function ( ) {
10+ describe ( 'Standard Text' , ( ) => {
11+ it ( 'should load' , ( ) => {
1212 // assertions here]
1313 expect ( typeof jsPDF ) . toBe ( 'function' )
1414 } )
15- it ( 'should generate blank page' , function ( ) {
16- var doc = jsPDF ( )
15+ it ( 'should generate blank page' , ( ) => {
16+ const doc = jsPDF ( )
1717 comparePdf ( doc . output ( ) , 'blank.pdf' , 'text' )
1818 } )
19- it ( 'should allow text insertion' , function ( ) {
20- var doc = jsPDF ( )
19+ it ( 'should allow text insertion' , ( ) => {
20+ const doc = jsPDF ( )
2121 doc . text ( 10 , 10 , 'This is a test!' )
2222 comparePdf ( doc . output ( ) , 'standard.pdf' , 'text' )
2323 } )
24- it ( 'should allow text insertion at an angle' , function ( ) {
25- var doc = jsPDF ( )
24+ it ( 'should allow text insertion at an angle' , ( ) => {
25+ const doc = jsPDF ( )
2626 doc . text ( 20 , 20 , 'This is a test!' , null , 20 )
2727 comparePdf ( doc . output ( ) , 'angle.pdf' , 'text' )
2828 } )
29- it ( 'should render different font faces' , function ( ) {
30- var doc = jsPDF ( )
29+ it ( 'should render different font faces' , ( ) => {
30+ const doc = jsPDF ( )
3131
3232 doc . text ( 20 , 20 , 'This is the default font.' )
3333
@@ -49,16 +49,16 @@ describe('Standard Text', function () {
4949
5050 comparePdf ( doc . output ( ) , 'font-faces.pdf' , 'text' )
5151 } )
52- it ( 'should support multiple pages' , function ( ) {
53- var doc = jsPDF ( )
52+ it ( 'should support multiple pages' , ( ) => {
53+ const doc = jsPDF ( )
5454 doc . text ( 20 , 20 , 'Hello world!' )
5555 doc . text ( 20 , 30 , 'This is client-side JavaScript, pumping out a PDF.' )
5656 doc . addPage ( )
5757 doc . text ( 20 , 20 , 'Do you like that?' )
5858 comparePdf ( doc . output ( ) , 'two-page.pdf' , 'text' )
5959 } )
60- it ( 'should support different size fonts' , function ( ) {
61- var doc = jsPDF ( )
60+ it ( 'should support different size fonts' , ( ) => {
61+ const doc = jsPDF ( )
6262 doc . setFontSize ( 22 )
6363 doc . text ( 20 , 20 , 'This is a title' )
6464
0 commit comments