File tree 2 files changed +24
-5
lines changed
2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,14 @@ declare module 'wikijs' {
194
194
*/
195
195
mainImage ( ) : Promise < string > ;
196
196
197
+ /**
198
+ * Raw content from page
199
+ *
200
+ * @returns {Promise<string> }
201
+ * @memberof Page
202
+ */
203
+ rawContent ( ) : Promise < string > ;
204
+
197
205
/**
198
206
* Raw data from images from page
199
207
*
@@ -340,11 +348,11 @@ declare module 'wikijs' {
340
348
*/
341
349
mostViewed ( ) : Promise < { title : string ; count : number } [ ] > ;
342
350
343
- /**
344
- * Fetch all page titles in wiki
345
- * @method Wiki#allPages
346
- * @return {Promise<string[]> } Array of pages
347
- */
351
+ /**
352
+ * Fetch all page titles in wiki
353
+ * @method Wiki#allPages
354
+ * @return {Promise<string[]> } Array of pages
355
+ */
348
356
allPages ( ) : Promise < string [ ] > ;
349
357
350
358
/**
Original file line number Diff line number Diff line change @@ -437,4 +437,15 @@ describe('Live tests', () => {
437
437
refs . length . should . equal ( 140 ) ;
438
438
} ) ;
439
439
} ) ;
440
+
441
+ it ( 'should allow calling rawContent #153' , ( ) => {
442
+ this . timeout ( timeoutTime ) ;
443
+ return wiki ( )
444
+ . find ( 'Alphabet' )
445
+ . then ( page => {
446
+ page . rawContent ( ) . then ( rawContent => {
447
+ rawContent . length . should . equal ( 10 ) ;
448
+ } )
449
+ } ) ;
450
+ } ) ;
440
451
} ) ;
You can’t perform that action at this time.
0 commit comments