html-snapshots 0.17.2 → 0.18.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.
Files changed (71) hide show
  1. package/.github/workflows/verify.yml +32 -0
  2. package/{LICENSE → LICENSE.md} +1 -1
  3. package/README.md +5 -6
  4. package/examples/custom/myFilter.js +1 -1
  5. package/examples/custom/package-lock.json +781 -0
  6. package/examples/custom/package.json +2 -2
  7. package/examples/custom/snapshot.js +1 -1
  8. package/examples/debug-phantomjs/package-lock.json +781 -0
  9. package/examples/debug-phantomjs/package.json +2 -2
  10. package/examples/debug-phantomjs/snapshot.js +1 -1
  11. package/examples/html5rocks/package-lock.json +781 -0
  12. package/examples/html5rocks/package.json +2 -2
  13. package/examples/html5rocks/snapshot.js +1 -1
  14. package/examples/process-limit/package-lock.json +781 -0
  15. package/examples/process-limit/package.json +2 -2
  16. package/examples/process-limit/snapshot.js +1 -1
  17. package/examples/simple-promise/package-lock.json +781 -0
  18. package/examples/simple-promise/package.json +2 -2
  19. package/examples/simple-promise/snapshot.js +1 -1
  20. package/examples/sitemap-index/package-lock.json +781 -0
  21. package/examples/sitemap-index/package.json +2 -2
  22. package/examples/sitemap-index/snapshot.js +1 -1
  23. package/examples/utils/index.js +1 -1
  24. package/examples/verbose/package-lock.json +781 -0
  25. package/examples/verbose/package.json +2 -2
  26. package/examples/verbose/snapshot.js +1 -1
  27. package/lib/async/exists.js +6 -19
  28. package/lib/async/index.js +1 -1
  29. package/lib/common/index.js +1 -1
  30. package/lib/common/node.js +1 -1
  31. package/lib/common/sitemap.js +1 -1
  32. package/lib/html-snapshots.js +1 -1
  33. package/lib/input-generators/_base.js +1 -1
  34. package/lib/input-generators/array.js +1 -1
  35. package/lib/input-generators/index.js +1 -1
  36. package/lib/input-generators/robots.js +1 -1
  37. package/lib/input-generators/sitemap-index.js +1 -1
  38. package/lib/input-generators/sitemap.js +1 -1
  39. package/lib/input-generators/textfile.js +1 -1
  40. package/lib/phantom/customFilter.js +1 -1
  41. package/lib/phantom/default.js +1 -1
  42. package/lib/phantom/modules/cli.js +1 -1
  43. package/lib/phantom/modules/detectors.js +1 -1
  44. package/lib/phantom/modules/globals.js +1 -1
  45. package/lib/phantom/modules/selectorDetect.js +1 -1
  46. package/lib/phantom/modules/verbose.js +1 -1
  47. package/lib/phantom/removeScripts.js +1 -1
  48. package/package.json +19 -18
  49. package/test/helpers/options.js +1 -1
  50. package/test/helpers/result.js +1 -1
  51. package/test/helpers/sitemap.js +1 -1
  52. package/test/mocha/async/test.js +8 -8
  53. package/test/mocha/common/helpers.js +1 -1
  54. package/test/mocha/common/node.js +1 -1
  55. package/test/mocha/common/test.js +1 -1
  56. package/test/mocha/html-snapshots/basics.js +5 -7
  57. package/test/mocha/html-snapshots/myFilter.js +1 -1
  58. package/test/mocha/html-snapshots/phantomjs-options.js +33 -10
  59. package/test/mocha/html-snapshots/process-limit.js +1 -1
  60. package/test/mocha/html-snapshots/robots.js +1 -1
  61. package/test/mocha/html-snapshots/sitemap-index.js +1 -1
  62. package/test/mocha/html-snapshots/sitemap.js +1 -1
  63. package/test/mocha/html-snapshots/snapshot-scripts.js +1 -1
  64. package/test/mocha/html-snapshots/test.js +1 -1
  65. package/test/mocha/html-snapshots/use-jquery.js +1 -1
  66. package/test/mocha/html-snapshots/utils.js +9 -4
  67. package/test/mocha/input-generators/sitemap-index.js +1 -1
  68. package/test/mocha/input-generators/sitemap.js +1 -1
  69. package/test/mocha/input-generators/test.js +1 -1
  70. package/test/server/index.js +1 -1
  71. package/.travis.yml +0 -9
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Driver for html-snapshots library tests.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  /* global describe, before, after */
7
7
  var path = require("path");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Library tests focused on the useJQuery option.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  /* global it */
7
7
  var assert = require("assert");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * html-snapshots test utilities and constants.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  /* global Promise */
7
7
  var path = require("path");
@@ -46,12 +46,17 @@ function checkActualFiles (files) {
46
46
  return prev;
47
47
  }, files[0]);
48
48
  */
49
+ var exists = false;
49
50
  outputRoot = path.dirname(shortFile);
50
- if (fs.existsSync(outputRoot)) {
51
- dumpTree(outputRoot);
52
- } else {
51
+ try {
52
+ fs.statSync(outputRoot).isDirectory();
53
+ }
54
+ catch (e) {
53
55
  console.log("@@@ outputRoot not exist", outputRoot);
54
56
  }
57
+ if (exists) {
58
+ dumpTree(outputRoot);
59
+ }
55
60
  }
56
61
 
57
62
  return Promise.all(files.map(function (file) {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Sitemap-index tests.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  /* global describe, it, before */
7
7
  var assert = require("assert");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Sitemap tests.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  /* global describe, it, before */
7
7
  var assert = require("assert");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * General input generator tests.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  /* global describe, it, before */
7
7
  var assert = require("assert");
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Create a local web server for tests.
3
3
  *
4
- * Copyright (c) 2013 - 2020, Alex Grant, LocalNerve, contributors
4
+ * Copyright (c) 2013 - 2022, Alex Grant, LocalNerve, contributors
5
5
  */
6
6
  var pathm = require("path");
7
7
  var express = require("express");
package/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - 10
4
- - 12
5
- script:
6
- - npm run lint
7
- - npm run coverage
8
- after_success:
9
- - cat coverage/lcov.info | ./node_modules/.bin/coveralls