-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
128f946
to
8836e17
Compare
8836e17
to
b042d74
Compare
Add json loader
|
|
||
const fileA = isNode | ||
? fs.readFileSync(process.cwd() + '/tests/repo-example/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data') | ||
: new Buffer(require('raw!./../repo-example/blocks/12207028/122070286b9afa6620a66f715c7020d68af3d10e1a497971629c07606bfdb812303d.data')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bug
found (this took me a bit to figure out :))
When using raw-loader, a string is returned with the contents of the file, if the file content was text, it would be ok, but since it is an encoded protobuf, it will add extra encoding data (utf8) adding extra bytes to the content of the Buffer, increasing the size of the Block and by so, failing the test. Need to get another way to load the blocks into localstorage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this could work for you? https://github.com/martijnvermaat/binary-loader
issue: #50