File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,23 @@ describe('E2E', function() {
2020
2121 urls . forEach ( function ( url ) {
2222 describe ( url , function ( ) {
23- it ( 'should be successfully scraped' , function ( ) {
23+ it ( 'should be successfully scraped with byType filename generator ' , function ( ) {
2424 var scraperOptions = _ . clone ( options ) ;
2525 var hostname = URL . parse ( url ) . hostname ;
26- scraperOptions . directory = resultDirname + '/' + hostname ;
26+ scraperOptions . directory = resultDirname + '/' + hostname + '-byType' ;
2727 scraperOptions . urls = [ { url : url , filename : 'index.html' } ] ;
28+ scraperOptions . filenameGenerator = 'byType' ;
29+ return scraper . scrape ( scraperOptions ) . then ( function ( result ) {
30+ result . should . be . ok ( ) ;
31+ } ) ;
32+ } ) ;
33+
34+ it ( 'should be successfully scraped with bySiteStructure filename generator' , function ( ) {
35+ var scraperOptions = _ . clone ( options ) ;
36+ var hostname = URL . parse ( url ) . hostname ;
37+ scraperOptions . directory = resultDirname + '/' + hostname + '-bySiteStructure' ;
38+ scraperOptions . urls = [ { url : url } ] ;
39+ scraperOptions . filenameGenerator = 'bySiteStructure' ;
2840 return scraper . scrape ( scraperOptions ) . then ( function ( result ) {
2941 result . should . be . ok ( ) ;
3042 } ) ;
You can’t perform that action at this time.
0 commit comments