Skip to content

Tests on path resolution fail #2

@clarmso

Description

@clarmso

All tests with path resolution fail. Here's the test result given by "npm test":

gulp-sri-hash
plugin
✓ should know it's name
✓ should be callable
plugin()
✓ should pass through null files
✓ should throw on streams
✓ should bail on unsupported hashing algorithm
✓ should ignore missing external files
✓ should ignore existing integrity attribute
with absolute path resolution
1) should apply integrity hash sha256
2) should apply integrity hash sha384
3) should apply integrity hash sha512
4) should apply custom selectors
5) should apply hashing to whitelisted prefixes
with relative path resolution
6) should apply integrity hash sha256
7) should apply integrity hash sha384
8) should apply integrity hash sha512
9) should apply custom selectors

Here is the error message for one of the failed tests. All failed tests start with "Uncaught TypeError: this is not a typed array.".

 1) gulp-sri-hash plugin() with absolute path resolution should apply integrity hash sha256:
     Uncaught TypeError: this is not a typed array.
      at Function.from (native)
      at calculateSri (index.js:56:17)
      at getFileHash (index.js:63:7)
      at Object.addIntegrityAttribute (index.js:87:33)
      at exports.each (node_modules/cheerio/lib/api/traversing.js:300:24)
      at updateDOM (index.js:75:17)
      at DestroyableTransform.pipeHandler [as _transform] (index.js:126:29)
      at DestroyableTransform.Transform._read (node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:159:10)
      at DestroyableTransform.Transform._write (node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:147:83)
      at doWrite (node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:347:64)
      at writeOrBuffer (node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:336:5)
      at DestroyableTransform.Writable.write (node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:274:11)
      at write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
      at flow (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
      at DestroyableTransform.pipeOnReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
      at emitReadable_ (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
      at emitReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
      at readableAddChunk (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
      at DestroyableTransform.Readable.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
      at DestroyableTransform.Transform.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
      at afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
      at TransformState.afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
      at DestroyableTransform.noop [as _transform] (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/through2.js:26:3)
      at DestroyableTransform.Transform._read (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
      at DestroyableTransform.Transform._write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
      at doWrite (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
      at writeOrBuffer (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
      at DestroyableTransform.Writable.write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
      at write (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
      at flow (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
      at DestroyableTransform.pipeOnReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:664:5)
      at emitReadable_ (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:448:10)
      at emitReadable (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:444:5)
      at readableAddChunk (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:187:9)
      at DestroyableTransform.Readable.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:149:10)
      at DestroyableTransform.Transform.push (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:145:32)
      at afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:101:12)
      at TransformState.afterTransform (node_modules/gulp/node_modules/vinyl-fs/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:79:12)
      at node_modules/gulp/node_modules/vinyl-fs/lib/src/getContents/bufferFile.js:12:5
      at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:380:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions