You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having added mocha as a dependency, as per #2, I get test failures. In fact none seem to pass at all. This is on Ubuntu Xenial.
Output below:
> metalsmith-assets-copy@0.0.2 pretest ~/metalsmith-assets-copy
> npm -s run build
src/index.js -> lib/index.js
> metalsmith-assets-copy@0.0.2 test ~/metalsmith-assets-copy
> mocha --reporter spec
metalsmith-assets-improved
(when given a configuration object)
1) copies files from the default source directory to the default destination directory
2) copies files from a configured source directory to a configured destination directory
3) does not overwrite files when no "replace" option is given
4) does not overwrite files when the "replace" option is set to "none"
5) overwrites files when the "replace" option is set to "all"
6) only overwrites older files when the "replace" option is set to "old"
7) overwrites files in a custom directory when the "replace" option is set to "all"
8) only overwrites older files in a custom directory when the "replace" option is set to "old"
(when given an array of configuration objects)
- copies files from all configured source directories to all configured destination directories
- correctly observes the "replace" option of each config object
0 passing (251ms)
2 pending
8 failing
1) metalsmith-assets-improved
(when given a configuration object)
copies files from the default source directory to the default destination directory:
TypeError: Cannot destructure property `replace` of 'undefined' or 'null'.
at metalsmith_assets_copy (src/index.js:57:74)
at Context.<anonymous> (test/index.js:27:22)
2) metalsmith-assets-improved
(when given a configuration object)
copies files from a configured source directory to a configured destination directory:
Uncaught AssertionError: expected 0 to be above 0
at Object.compareFileStats (test/lib/test-functions.js:46:44)
at Metalsmith.<anonymous> (test/index.js:49:12)
at Immediate.<anonymous> (node_modules/unyield/node_modules/co/index.js:52:14)
3) metalsmith-assets-improved
(when given a configuration object)
does not overwrite files when no "replace" option is given:
TypeError: Cannot destructure property `replace` of 'undefined' or 'null'.
at metalsmith_assets_copy (src/index.js:57:74)
at Context.<anonymous> (test/index.js:64:14)
4) metalsmith-assets-improved
(when given a configuration object)
does not overwrite files when the "replace" option is set to "none":
Uncaught AssertionError: expected [ Array(3) ] to be a superset of [ Array(7) ]
at Object.compareFileStats (test/lib/test-functions.js:47:46)
at Metalsmith.<anonymous> (test/index.js:95:14)
at Immediate.<anonymous> (node_modules/unyield/node_modules/co/index.js:52:14)
5) metalsmith-assets-improved
(when given a configuration object)
overwrites files when the "replace" option is set to "all":
Uncaught AssertionError: expected 2019-01-30T19:51:54.384+00:00 to be the same as 2019-01-30T19:56:43.015+00:00
+ expected - actual
-2019-01-30T19:51:54.384+00:00
+2019-01-30T19:56:43.015+00:00
at expectedFiles.forEach.file (test/lib/test-functions.js:78:54)
at Array.forEach (<anonymous>)
at Object.compareFileStats (test/lib/test-functions.js:49:23)
at Metalsmith.<anonymous> (test/index.js:120:14)
at Immediate.<anonymous> (node_modules/unyield/node_modules/co/index.js:52:14)
6) metalsmith-assets-improved
(when given a configuration object)
only overwrites older files when the "replace" option is set to "old":
Uncaught AssertionError: expected [ Array(3) ] to be a superset of [ Array(7) ]
at Object.compareFileStats (test/lib/test-functions.js:47:46)
at Metalsmith.<anonymous> (test/index.js:145:14)
at Immediate.<anonymous> (node_modules/unyield/node_modules/co/index.js:52:14)
7) metalsmith-assets-improved
(when given a configuration object)
overwrites files in a custom directory when the "replace" option is set to "all":
Uncaught AssertionError: expected 2019-01-30T19:51:54.408+00:00 to be the same as 2019-01-30T19:56:43.071+00:00
+ expected - actual
-2019-01-30T19:51:54.408+00:00
+2019-01-30T19:56:43.071+00:00
at expectedFiles.forEach.file (test/lib/test-functions.js:78:54)
at Array.forEach (<anonymous>)
at Object.compareFileStats (test/lib/test-functions.js:49:23)
at Metalsmith.<anonymous> (test/index.js:172:14)
at Immediate.<anonymous> (node_modules/unyield/node_modules/co/index.js:52:14)
8) metalsmith-assets-improved
(when given a configuration object)
only overwrites older files in a custom directory when the "replace" option is set to "old":
Uncaught AssertionError: expected [ Array(2) ] to be a superset of [ Array(7) ]
at Object.compareFileStats (test/lib/test-functions.js:47:46)
at Metalsmith.<anonymous> (test/index.js:198:14)
at Immediate.<anonymous> (node_modules/unyield/node_modules/co/index.js:52:14)
npm ERR! Test failed. See above for more details.
The text was updated successfully, but these errors were encountered:
Having added mocha as a dependency, as per #2, I get test failures. In fact none seem to pass at all. This is on Ubuntu Xenial.
Output below:
The text was updated successfully, but these errors were encountered: