html-snapshots 1.3.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/index.js +57 -3
- package/lib/common/sitemap/sitemap-collection.js +3 -2
- package/lib/common/sitemap/sitemap-index.js +1 -4
- package/lib/common/sitemap/sitemap.js +15 -13
- package/lib/html-snapshots.js +5 -6
- package/lib/input-generators/_base.js +5 -5
- package/package.json +5 -6
- package/.c8rc.json +0 -5
- package/.eslintignore +0 -5
- package/.eslintrc.json +0 -16
- package/.github/issue_template.md +0 -16
- package/.github/workflows/verify.yml +0 -32
- package/docs/example-heroku-redis.md +0 -43
- package/docs/notes.md +0 -42
- package/examples/README.md +0 -149
- package/examples/custom/README.md +0 -22
- package/examples/custom/myFilter.js +0 -22
- package/examples/custom/package-lock.json +0 -2804
- package/examples/custom/package.json +0 -12
- package/examples/custom/snapshot.js +0 -28
- package/examples/debug-phantomjs/README.md +0 -38
- package/examples/debug-phantomjs/package-lock.json +0 -2922
- package/examples/debug-phantomjs/package.json +0 -12
- package/examples/debug-phantomjs/snapshot.js +0 -60
- package/examples/debug-puppeteer/README.md +0 -18
- package/examples/debug-puppeteer/package-lock.json +0 -2804
- package/examples/debug-puppeteer/package.json +0 -12
- package/examples/debug-puppeteer/snapshot.js +0 -30
- package/examples/html5rocks/README.md +0 -22
- package/examples/html5rocks/package-lock.json +0 -3218
- package/examples/html5rocks/package.json +0 -12
- package/examples/html5rocks/snapshot.js +0 -59
- package/examples/process-limit/README.md +0 -24
- package/examples/process-limit/package-lock.json +0 -2830
- package/examples/process-limit/package.json +0 -12
- package/examples/process-limit/snapshot.js +0 -30
- package/examples/simple-promise/README.md +0 -20
- package/examples/simple-promise/package-lock.json +0 -2830
- package/examples/simple-promise/package.json +0 -12
- package/examples/simple-promise/snapshot.js +0 -30
- package/examples/sitemap-index/README.md +0 -20
- package/examples/sitemap-index/package-lock.json +0 -2830
- package/examples/sitemap-index/package.json +0 -12
- package/examples/sitemap-index/snapshot.js +0 -34
- package/examples/verbose/README.md +0 -22
- package/examples/verbose/package-lock.json +0 -2805
- package/examples/verbose/package.json +0 -12
- package/examples/verbose/snapshot.js +0 -34
- package/test/helpers/options.js +0 -55
- package/test/helpers/result.js +0 -32
- package/test/helpers/sitemap.js +0 -130
- package/test/mocha/async/test.js +0 -416
- package/test/mocha/browsers/puppeteer.js +0 -129
- package/test/mocha/browsers/server/index.html +0 -9
- package/test/mocha/browsers/test.js +0 -11
- package/test/mocha/common/helpers.js +0 -87
- package/test/mocha/common/test.js +0 -188
- package/test/mocha/html-snapshots/basics.js +0 -88
- package/test/mocha/html-snapshots/myFilter.js +0 -10
- package/test/mocha/html-snapshots/phantomjs-options.js +0 -156
- package/test/mocha/html-snapshots/process-limit.js +0 -156
- package/test/mocha/html-snapshots/puppeteer.js +0 -47
- package/test/mocha/html-snapshots/robots.js +0 -194
- package/test/mocha/html-snapshots/server/contact/index.html +0 -57
- package/test/mocha/html-snapshots/server/favicon.ico +0 -0
- package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.eot +0 -0
- package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.svg +0 -220
- package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.ttf +0 -0
- package/test/mocha/html-snapshots/server/fonts/facebolf-webfont.woff +0 -0
- package/test/mocha/html-snapshots/server/images/ajax-loader.gif +0 -0
- package/test/mocha/html-snapshots/server/images/art1.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpet.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet1.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet1_th.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet2.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet2_th.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet3.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet3_th.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet4.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/carpets/carpet4_th.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/floor.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/bullets.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/left-arrow-small.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/left-arrow.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/loading.gif +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/mask-black.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/pause-black.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/right-arrow-small.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/right-arrow.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/rotator-black.png +0 -0
- package/test/mocha/html-snapshots/server/images/foundation/orbit/timer-black.png +0 -0
- package/test/mocha/html-snapshots/server/images/home-sprite/certification.png +0 -0
- package/test/mocha/html-snapshots/server/images/home-sprite/cleantrust.png +0 -0
- package/test/mocha/html-snapshots/server/images/home-sprite/institute.png +0 -0
- package/test/mocha/html-snapshots/server/images/home-sprite-s1a48fdbd81.png +0 -0
- package/test/mocha/html-snapshots/server/images/logo-300.png +0 -0
- package/test/mocha/html-snapshots/server/images/slider1-lg.jpg +0 -0
- package/test/mocha/html-snapshots/server/images/slider1.jpg +0 -0
- package/test/mocha/html-snapshots/server/index.css +0 -1
- package/test/mocha/html-snapshots/server/index.html +0 -57
- package/test/mocha/html-snapshots/server/nojq/index.html +0 -46
- package/test/mocha/html-snapshots/server/pjsopts/index.html +0 -55
- package/test/mocha/html-snapshots/server/public/page-sitemap.xml +0 -16
- package/test/mocha/html-snapshots/server/public/wordpress/category-sitemap.xml +0 -13
- package/test/mocha/html-snapshots/server/public/wordpress/page-sitemap.xml +0 -16
- package/test/mocha/html-snapshots/server/public/wordpress/post-sitemap.xml +0 -27
- package/test/mocha/html-snapshots/server/public/wordpress/post_tag-sitemap.xml +0 -17
- package/test/mocha/html-snapshots/server/public/wordpress/product-sitemap.xml +0 -13
- package/test/mocha/html-snapshots/server/public/wordpress-2/category-sitemap.xml +0 -13
- package/test/mocha/html-snapshots/server/public/wordpress-2/page-sitemap.xml +0 -16
- package/test/mocha/html-snapshots/server/public/wordpress-2/post-sitemap.xml +0 -27
- package/test/mocha/html-snapshots/server/public/wordpress-2/post_tag-sitemap.xml +0 -17
- package/test/mocha/html-snapshots/server/public/wordpress-2/product-sitemap.xml +0 -13
- package/test/mocha/html-snapshots/server/require.js +0 -1
- package/test/mocha/html-snapshots/server/services/carpets/index.html +0 -57
- package/test/mocha/html-snapshots/server/test_robots.txt +0 -13
- package/test/mocha/html-snapshots/server/test_robots_sitemap.txt +0 -15
- package/test/mocha/html-snapshots/server/test_robots_sitemap.xml +0 -22
- package/test/mocha/html-snapshots/server/test_sitemap_index-2.xml +0 -25
- package/test/mocha/html-snapshots/server/test_sitemap_index-3.xml +0 -25
- package/test/mocha/html-snapshots/server/test_sitemap_index.xml +0 -25
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/extras/custom-validity.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/extras/modernizr-custom.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/extras/mousepress.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/polyfiller.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/canvas2png.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/flashcanvas.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/flashcanvas.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/proxy.php +0 -73
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvas/save.php +0 -49
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/canvas2png.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/flash10canvas.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/flash9canvas.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/flashcanvas.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/proxy.php +0 -73
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/FlashCanvasPro/save.php +0 -49
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/1.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/10.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/11.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/12.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/13.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/14.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/15.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/16.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/17.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/18.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/19.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/2.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/20.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/21.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/22.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/23.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/24.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/25.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/26.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/27.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/3.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/4.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/5.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/59.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/6.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/7.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/8.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/combos/9.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/details.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/dom-extend.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/es5.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/excanvas.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-core.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-datalist.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-message.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-native-extend.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-number-date-api.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-number-date-ui.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/form-shim-extend.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/geolocation.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ar.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ch-ZN.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-de.txt +0 -33
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-el.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-en.txt +0 -34
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-es.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-fr.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-he.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-hi.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-hu.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-it.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ja.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-nl.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-pt-PT.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-ru.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/i18n/errormessages-sv.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/json-storage.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/jwplayer/license.txt +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/jwplayer/player.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/jwplayer/readme.html +0 -87
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-core.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-jaris.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-native-fix.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-swf.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/mediaelement-yt.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/details-arrows.png +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/forms.png +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/polyfill-loader.gif +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/styles/shim.css +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/swf/JarisFLVPlayer.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/swf/jwwebshims.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/swf/localStorage.swf +0 -0
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/track-ui.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/libs/webshim/minified/shims/track.js +0 -1
- package/test/mocha/html-snapshots/server/vendor/js/plugins/cload.js +0 -49
- package/test/mocha/html-snapshots/server/vendor/js/plugins/modernizr.js +0 -4
- package/test/mocha/html-snapshots/server/vendor/js/plugins/oldie.js +0 -74
- package/test/mocha/html-snapshots/sitemap-index.js +0 -140
- package/test/mocha/html-snapshots/sitemap.js +0 -104
- package/test/mocha/html-snapshots/snapshot-scripts.js +0 -206
- package/test/mocha/html-snapshots/test.js +0 -105
- package/test/mocha/html-snapshots/test_robots.txt +0 -13
- package/test/mocha/html-snapshots/test_sitemap.xml +0 -22
- package/test/mocha/html-snapshots/use-jquery.js +0 -144
- package/test/mocha/html-snapshots/utils.js +0 -200
- package/test/mocha/input-generators/server/public/wordpress/category-sitemap.xml +0 -13
- package/test/mocha/input-generators/server/public/wordpress/page-sitemap.xml +0 -16
- package/test/mocha/input-generators/server/public/wordpress/post-sitemap.xml +0 -55
- package/test/mocha/input-generators/server/public/wordpress/post_tag-sitemap.xml +0 -25
- package/test/mocha/input-generators/server/public/wordpress/product-sitemap.xml +0 -13
- package/test/mocha/input-generators/server/test_robots.txt +0 -15
- package/test/mocha/input-generators/server/test_robots_bad.txt +0 -11
- package/test/mocha/input-generators/server/test_robots_sitemap.txt +0 -17
- package/test/mocha/input-generators/server/test_robots_sitemap_bad.txt +0 -17
- package/test/mocha/input-generators/server/test_robots_sitemap_multi.txt +0 -18
- package/test/mocha/input-generators/server/test_sitemap.xml +0 -34
- package/test/mocha/input-generators/server/test_sitemap.xml.gz +0 -0
- package/test/mocha/input-generators/server/test_sitemap_bad.xml.gz +0 -0
- package/test/mocha/input-generators/server/test_sitemap_index.xml +0 -25
- package/test/mocha/input-generators/server/test_sitemap_index.xml.gz +0 -0
- package/test/mocha/input-generators/server/test_sitemap_index_empty.xml +0 -3
- package/test/mocha/input-generators/server/test_sitemap_index_malformed.xml +0 -2
- package/test/mocha/input-generators/sitemap-index.js +0 -87
- package/test/mocha/input-generators/sitemap.js +0 -320
- package/test/mocha/input-generators/test.js +0 -1447
- package/test/mocha/input-generators/test_line.txt +0 -5
- package/test/mocha/input-generators/test_robots.txt +0 -15
- package/test/mocha/input-generators/test_robots_bad.txt +0 -11
- package/test/mocha/input-generators/test_robots_sitemap.txt +0 -17
- package/test/mocha/input-generators/test_robots_sitemap_bad.txt +0 -17
- package/test/mocha/input-generators/test_robots_sitemap_multi.txt +0 -18
- package/test/mocha/input-generators/test_sitemap.xml +0 -34
- package/test/mocha/input-generators/test_sitemap.xml.gz +0 -0
- package/test/mocha/input-generators/test_sitemap_bad.xml.gz +0 -0
- package/test/mocha/input-generators/test_sitemap_index.xml +0 -25
- package/test/mocha/input-generators/test_sitemap_index.xml.gz +0 -0
- package/test/server/index.js +0 -32
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Library tests focused on the processLimit option.
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
|
|
5
|
-
*/
|
|
6
|
-
/* global it */
|
|
7
|
-
const assert = require("assert");
|
|
8
|
-
const rimraf = require("rimraf").sync;
|
|
9
|
-
const utils = require("./utils");
|
|
10
|
-
const optHelp = require("../../helpers/options");
|
|
11
|
-
const ss = require("../../../lib/html-snapshots");
|
|
12
|
-
const robotsTests = require("./robots");
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
timeout,
|
|
16
|
-
outputDir,
|
|
17
|
-
cleanup,
|
|
18
|
-
killSpawnedProcesses,
|
|
19
|
-
countSpawnedProcesses,
|
|
20
|
-
unexpectedError,
|
|
21
|
-
multiError,
|
|
22
|
-
checkActualFiles
|
|
23
|
-
} = utils;
|
|
24
|
-
|
|
25
|
-
const urls = robotsTests.urlCount;
|
|
26
|
-
|
|
27
|
-
function processLimitTests (options) {
|
|
28
|
-
const {
|
|
29
|
-
port,
|
|
30
|
-
localRobotsFile: inputFile,
|
|
31
|
-
browsers
|
|
32
|
-
} = options;
|
|
33
|
-
const pollInterval = 50;
|
|
34
|
-
let phantomCount = 0;
|
|
35
|
-
let timer;
|
|
36
|
-
|
|
37
|
-
function completeTest (done, processLimit, e, files) {
|
|
38
|
-
const countError = phantomCount ?
|
|
39
|
-
new Error(`${phantomCount} exceeded processLimit ${processLimit}`) :
|
|
40
|
-
undefined;
|
|
41
|
-
|
|
42
|
-
clearInterval(timer);
|
|
43
|
-
|
|
44
|
-
if (files) {
|
|
45
|
-
checkActualFiles(files).then(() => {
|
|
46
|
-
cleanup(done, multiError(e, countError));
|
|
47
|
-
});
|
|
48
|
-
} else {
|
|
49
|
-
cleanup(done, multiError(e, countError));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return function () {
|
|
54
|
-
browsers.forEach(browser => {
|
|
55
|
-
it(`should limit as expected - ${browser}`, function (done) {
|
|
56
|
-
const processLimit = urls - 1;
|
|
57
|
-
const complete = completeTest.bind(null, done, processLimit);
|
|
58
|
-
|
|
59
|
-
if (process.platform === "win32") {
|
|
60
|
-
assert.ok(true, "Skipping posix compliant tests for processLimit");
|
|
61
|
-
done();
|
|
62
|
-
} else {
|
|
63
|
-
rimraf(outputDir);
|
|
64
|
-
|
|
65
|
-
killSpawnedProcesses(function (err) {
|
|
66
|
-
const options = {
|
|
67
|
-
source: inputFile,
|
|
68
|
-
hostname: "localhost",
|
|
69
|
-
selector: "#dynamic-content",
|
|
70
|
-
outputDirClean: true,
|
|
71
|
-
outputDir,
|
|
72
|
-
timeout,
|
|
73
|
-
processLimit,
|
|
74
|
-
port,
|
|
75
|
-
browser
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
if (err) {
|
|
79
|
-
return done(err);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
ss.run(optHelp.decorate(options))
|
|
83
|
-
.then(() => {
|
|
84
|
-
complete();
|
|
85
|
-
})
|
|
86
|
-
.catch(e => {
|
|
87
|
-
complete(e || unexpectedError, e.notCompleted);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
timer = setInterval(() => {
|
|
91
|
-
countSpawnedProcesses(function (count) {
|
|
92
|
-
// console.log("@@@ DEBUG @@@ phantom count: "+count);
|
|
93
|
-
if (count > processLimit) {
|
|
94
|
-
phantomCount = count;
|
|
95
|
-
clearInterval(timer);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}, pollInterval);
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
it(`should limit to just one process - ${browser}`, function (done) {
|
|
104
|
-
const processLimit = 1;
|
|
105
|
-
const complete = completeTest.bind(null, done, processLimit);
|
|
106
|
-
|
|
107
|
-
if (process.platform === "win32") {
|
|
108
|
-
assert.ok(true, "Skipping posix compliant tests for processLimit");
|
|
109
|
-
done();
|
|
110
|
-
} else {
|
|
111
|
-
rimraf(outputDir);
|
|
112
|
-
|
|
113
|
-
killSpawnedProcesses(function (err) {
|
|
114
|
-
const options = {
|
|
115
|
-
source: inputFile,
|
|
116
|
-
hostname: "localhost",
|
|
117
|
-
selector: "#dynamic-content",
|
|
118
|
-
outputDirClean: true,
|
|
119
|
-
outputDir,
|
|
120
|
-
timeout,
|
|
121
|
-
processLimit,
|
|
122
|
-
port,
|
|
123
|
-
browser
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
if (err) {
|
|
127
|
-
return done(err);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
ss.run(optHelp.decorate(options))
|
|
131
|
-
.then(() => {
|
|
132
|
-
complete();
|
|
133
|
-
})
|
|
134
|
-
.catch(e => {
|
|
135
|
-
complete(e || unexpectedError, e.notCompleted);
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
timer = setInterval(function () {
|
|
139
|
-
countSpawnedProcesses(function (count) {
|
|
140
|
-
// console.log("@@@ DEBUG @@@ phantom count: "+count);
|
|
141
|
-
if (count > processLimit) {
|
|
142
|
-
phantomCount = count;
|
|
143
|
-
clearInterval(timer);
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}, pollInterval);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
module.exports = {
|
|
155
|
-
testSuite: processLimitTests
|
|
156
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tests unique to the puppeteer browser.
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
|
|
5
|
-
*/
|
|
6
|
-
/* global it */
|
|
7
|
-
const optHelp = require("../../helpers/options");
|
|
8
|
-
const ss = require("../../../lib/html-snapshots");
|
|
9
|
-
const {
|
|
10
|
-
outputDir,
|
|
11
|
-
cleanupSuccess,
|
|
12
|
-
testSuccess
|
|
13
|
-
} = require("./utils");
|
|
14
|
-
|
|
15
|
-
function puppeteerTests (options) {
|
|
16
|
-
const {
|
|
17
|
-
port
|
|
18
|
-
} = options;
|
|
19
|
-
|
|
20
|
-
return function () {
|
|
21
|
-
|
|
22
|
-
it("should launch debugger when requested", function (done) {
|
|
23
|
-
const options = {
|
|
24
|
-
source: [
|
|
25
|
-
`http://localhost:${port}/contact`
|
|
26
|
-
],
|
|
27
|
-
outputDir,
|
|
28
|
-
timeout: 5000,
|
|
29
|
-
debug: {
|
|
30
|
-
flag: true,
|
|
31
|
-
slowMo: 50
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const success = testSuccess.bind(null, cleanupSuccess.bind(null, done));
|
|
36
|
-
|
|
37
|
-
// TODO: check for headless: false chrome invocation
|
|
38
|
-
ss.run(optHelp.decorate(options))
|
|
39
|
-
.then(success)
|
|
40
|
-
.catch(done);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
module.exports = {
|
|
46
|
-
testSuite: puppeteerTests
|
|
47
|
-
};
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Library tests that use robots.
|
|
3
|
-
*
|
|
4
|
-
* Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
|
|
5
|
-
*/
|
|
6
|
-
/* global it */
|
|
7
|
-
const rimraf = require("rimraf").sync;
|
|
8
|
-
const _ = require("lodash");
|
|
9
|
-
const common = require("../../../lib/common");
|
|
10
|
-
const optHelp = require("../../helpers/options");
|
|
11
|
-
const ss = require("../../../lib/html-snapshots");
|
|
12
|
-
const utils = require("./utils");
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
timeout,
|
|
16
|
-
outputDir,
|
|
17
|
-
cleanup,
|
|
18
|
-
cleanupSuccess,
|
|
19
|
-
cleanupError,
|
|
20
|
-
testSuccess,
|
|
21
|
-
bogusFile,
|
|
22
|
-
unexpectedSuccess,
|
|
23
|
-
checkActualFiles
|
|
24
|
-
} = utils;
|
|
25
|
-
|
|
26
|
-
const urls = 3; // must match url # in robots files test fixtures.
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* The robots test suite.
|
|
30
|
-
*/
|
|
31
|
-
function robotsTests (options) {
|
|
32
|
-
const {
|
|
33
|
-
port,
|
|
34
|
-
localRobotsFile,
|
|
35
|
-
browsers
|
|
36
|
-
} = options;
|
|
37
|
-
|
|
38
|
-
// Robots.txt fixtures
|
|
39
|
-
const inputFiles = [
|
|
40
|
-
localRobotsFile,
|
|
41
|
-
`http://localhost:${port}/test_robots.txt`,
|
|
42
|
-
`http://localhost:${port}/test_robots_sitemap.txt`
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
return function () {
|
|
46
|
-
function createOptions (newOptions) {
|
|
47
|
-
const options = {
|
|
48
|
-
hostname: "localhost",
|
|
49
|
-
selector: "#dynamic-content",
|
|
50
|
-
outputDirClean: true,
|
|
51
|
-
outputDir,
|
|
52
|
-
timeout,
|
|
53
|
-
port
|
|
54
|
-
};
|
|
55
|
-
return {
|
|
56
|
-
...options,
|
|
57
|
-
...newOptions
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
browsers.forEach(browser => {
|
|
61
|
-
inputFiles.forEach(inputFile => {
|
|
62
|
-
it(`should succeed, no output dir pre-exists, ${browser}, ${inputFile}`, function (done) {
|
|
63
|
-
const options = createOptions({
|
|
64
|
-
source: inputFile,
|
|
65
|
-
browser
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
const twice = _.after(2, cleanupSuccess.bind(null, done));
|
|
69
|
-
|
|
70
|
-
rimraf(outputDir);
|
|
71
|
-
|
|
72
|
-
ss.run(optHelp.decorate(options), twice)
|
|
73
|
-
.then(testSuccess.bind(null, twice))
|
|
74
|
-
.catch(e => {
|
|
75
|
-
checkActualFiles(e.notCompleted)
|
|
76
|
-
.then(() => {
|
|
77
|
-
cleanup(done, e);
|
|
78
|
-
});
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it(`should succeed, output dir does pre-exist, ${browser}, ${inputFile}`, function (done) {
|
|
83
|
-
const options = createOptions({
|
|
84
|
-
source: inputFile,
|
|
85
|
-
browser
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
const twice = _.after(2, cleanupSuccess.bind(null, done));
|
|
89
|
-
|
|
90
|
-
ss.run(optHelp.decorate(options), twice)
|
|
91
|
-
.then(testSuccess.bind(null, twice))
|
|
92
|
-
.catch(e => {
|
|
93
|
-
checkActualFiles(e.notCompleted)
|
|
94
|
-
.then(() => {
|
|
95
|
-
cleanup(done, e);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
it(`should fail with bad phantomjs process to spawn, succeed otherwise, ${browser}, ${inputFile}`,
|
|
101
|
-
function (done) {
|
|
102
|
-
const options = createOptions({
|
|
103
|
-
source: inputFile,
|
|
104
|
-
browser,
|
|
105
|
-
phantomjs: bogusFile,
|
|
106
|
-
timeout: 1000
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
if (browser === "phantomjs") {
|
|
110
|
-
const twice = _.after(2, cleanupError.bind(null, done, 0));
|
|
111
|
-
|
|
112
|
-
ss.run(options, twice)
|
|
113
|
-
.then(unexpectedSuccess.bind(null, done))
|
|
114
|
-
.catch(twice);
|
|
115
|
-
} else {
|
|
116
|
-
options.timeout = utils.timeout;
|
|
117
|
-
const twice = _.after(2, cleanupSuccess.bind(null, done));
|
|
118
|
-
|
|
119
|
-
ss.run(optHelp.decorate(options), twice)
|
|
120
|
-
.then(testSuccess.bind(null, twice))
|
|
121
|
-
.catch(e => {
|
|
122
|
-
checkActualFiles(e.notCompleted)
|
|
123
|
-
.then(() => {
|
|
124
|
-
cleanup(done, e);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
it(`should fail, bad remote robots, ${browser}, ${inputFile}`, function (done) {
|
|
131
|
-
const options = createOptions({
|
|
132
|
-
input: "robots",
|
|
133
|
-
source: `http://localhost:${port}/index.html`,
|
|
134
|
-
timeout: 5000,
|
|
135
|
-
browser
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
const twice = _.after(2, cleanupError.bind(null, done, 0));
|
|
139
|
-
|
|
140
|
-
ss.run(optHelp.decorate(options), twice)
|
|
141
|
-
.then(unexpectedSuccess.bind(null, done))
|
|
142
|
-
.catch(twice);
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it(`should fail, non-existent selector, ${browser}, ${inputFile}`, function (done) {
|
|
146
|
-
const options = createOptions({
|
|
147
|
-
source: inputFile,
|
|
148
|
-
selector: "#dynamic-content-notexist",
|
|
149
|
-
timeout: 5000,
|
|
150
|
-
browser
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
const twice = _.after(2, cleanupError.bind(null, done, 0));
|
|
154
|
-
|
|
155
|
-
ss.run(optHelp.decorate(options), twice)
|
|
156
|
-
.then(unexpectedSuccess.bind(null, done))
|
|
157
|
-
.catch(twice);
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
it(`should fail one snapshot, one non-existent selector, ${browser}, ${inputFile}`, function (done) {
|
|
161
|
-
let exceptionUrl = "/";
|
|
162
|
-
if (common.isUrl(inputFile)) {
|
|
163
|
-
// assume the origin of the inputFile is the same as the contents of the remote urls within it.
|
|
164
|
-
const url = new URL(inputFile);
|
|
165
|
-
const isSitemap = url.pathname.includes('sitemap');
|
|
166
|
-
if (isSitemap) {
|
|
167
|
-
exceptionUrl = `${url.origin}${exceptionUrl}`;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
const options = createOptions({
|
|
171
|
-
source: inputFile,
|
|
172
|
-
selector: {
|
|
173
|
-
"__default": "#dynamic-content",
|
|
174
|
-
[exceptionUrl]: "#dynamic-content-notexist"
|
|
175
|
-
},
|
|
176
|
-
timeout: 5000,
|
|
177
|
-
browser
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
const twice = _.after(2, cleanupError.bind(null, done, urls - 1));
|
|
181
|
-
|
|
182
|
-
ss.run(optHelp.decorate(options), twice)
|
|
183
|
-
.then(unexpectedSuccess.bind(null, done))
|
|
184
|
-
.catch(twice);
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
});
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
module.exports = {
|
|
192
|
-
testSuite: robotsTests,
|
|
193
|
-
urlCount: urls
|
|
194
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<!--[if lt IE 8 ]><html class="ie7" xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> <![endif]-->
|
|
3
|
-
<!--[if IE 8 ]><html class="ie8" xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> <![endif]-->
|
|
4
|
-
<!--[if IE 9 ]><html class="ie9" xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> <![endif]-->
|
|
5
|
-
<!--[if (gt IE 9)|!(IE)]><!--><html xmlns:og="http://opengraphprotocol.org/schema/" lang="en"> <!--<![endif]-->
|
|
6
|
-
<head>
|
|
7
|
-
<meta charset="utf-8">
|
|
8
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
9
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
10
|
-
<meta name="fragment" content="!">
|
|
11
|
-
|
|
12
|
-
<title>North Star Cleaning Services</title>
|
|
13
|
-
<meta name="description" content="This is a static description string">
|
|
14
|
-
<meta name="keywords" content="This is a static keyword string">
|
|
15
|
-
|
|
16
|
-
<!-- og for facebook -->
|
|
17
|
-
<meta property="og:url" content="http://www.northstarcleaningme.com/" />
|
|
18
|
-
<meta property="og:image" content="http://www.northstarcleaningme.com/images/logo.jpg" />
|
|
19
|
-
<meta property="og:locale" content="en_US"/>
|
|
20
|
-
<meta property="og:site_name" content="North Star Cleaning Service"/>
|
|
21
|
-
<meta property="og:type" content="website"/>
|
|
22
|
-
<meta property="og:title" content="North Star Cleaning Service"/>
|
|
23
|
-
<meta property="og:description" content="North Star Cleaning Service description"/>
|
|
24
|
-
|
|
25
|
-
<link rel="shortcut icon" href="/favicon.ico" />
|
|
26
|
-
<link rel="icon" href="/favicon.ico" />
|
|
27
|
-
<link rel="canonical" href="http://www.northstarcleaningme.com/" />
|
|
28
|
-
|
|
29
|
-
<!-- Application styles. -->
|
|
30
|
-
|
|
31
|
-
<link rel="stylesheet" href="/index.css">
|
|
32
|
-
<script src="/vendor/js/plugins/modernizr.js"></script>
|
|
33
|
-
|
|
34
|
-
<!-- <script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script> -->
|
|
35
|
-
</head>
|
|
36
|
-
|
|
37
|
-
<body>
|
|
38
|
-
<canvas id="canvas-section"></canvas>
|
|
39
|
-
|
|
40
|
-
<!-- Application container. -->
|
|
41
|
-
|
|
42
|
-
<div role="main" id="main">
|
|
43
|
-
<div class="main-grid-row">
|
|
44
|
-
<div class="main-grid-column centered">
|
|
45
|
-
<noscript>
|
|
46
|
-
<h1>North Star Cleaning Services</h1>
|
|
47
|
-
<p>This site requires javascript be enabled.</p>
|
|
48
|
-
</noscript>
|
|
49
|
-
<div class="page-spinner"></div>
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<!-- Application source. -->
|
|
54
|
-
|
|
55
|
-
<script src="/require.js"></script>
|
|
56
|
-
</body>
|
|
57
|
-
</html>
|
|
Binary file
|
|
Binary file
|