File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ describe('Page', () => {
1111
1212 axiosMock . onAny ( ) . reply ( 200 , Buffer . from ( '' ) )
1313
14- test ( 'it encode the page.html option' , async ( ) => {
14+ test ( 'it encode the page.html option (pdf) ' , async ( ) => {
1515 await client . pdf . direct ( {
1616 page : {
1717 html : '<div>Your first Doczilla PDF</div>'
@@ -26,4 +26,19 @@ describe('Page', () => {
2626 } ) )
2727 } )
2828
29+ test ( 'it encode the page.html option (screenshot)' , async ( ) => {
30+ await client . screenshot . direct ( {
31+ page : {
32+ html : '<div>Your first Doczilla PDF</div>'
33+ }
34+ } )
35+
36+ expect ( axiosMock . history . post . length ) . toBe ( 1 )
37+ expect ( axiosMock . history . post [ 0 ] . data ) . toEqual ( JSON . stringify ( {
38+ page : {
39+ html : 'PGRpdj5Zb3VyIGZpcnN0IERvY3ppbGxhIFBERjwvZGl2Pg=='
40+ }
41+ } ) )
42+ } )
43+
2944} )
You can’t perform that action at this time.
0 commit comments