Comments (7)
This line is obviously wrong, it should be a normal function. Not sure why travis thinks it's ok.
from crumb.
@BCook98 I can't reproduce locally. What environment are you running the test in?
blastoise:crumb stongo$ node --version
v4.2.1
blastoise:crumb stongo$ npm test
> [email protected] test /Users/stongo/dev/crumb
> lab -r console -t 100 -a code -L
...........
11 tests complete
Test duration: 291 ms
Assertions count: 70 (verbosity: 6.36)
No global variable leaks detected
Coverage: 100.00%
Linting results: No issues
from crumb.
@stongo Super weird, Same error on both latest Node v4 and v6. I am running OSX (zsh and n), but I get the same thing on my CentOS VM (bash and nvm).
~/hapijs/crumb (master)$ node -v
v4.2.1
~/hapijs/crumb (master)$ npm test
> [email protected] test /Users/brandoncook/hapijs/crumb
> lab -r console -t 100 -a code -L
x..........
Test script errors:
this.push is not a function
at TestStream._read (/Users/brandoncook/hapijs/crumb/test/index.js:146:46)
at Readable.read (_stream_readable.js:328:10)
at resume_ (_stream_readable.js:718:12)
at doNTCallback2 (node.js:439:9)
at process._tickDomainCallback (node.js:394:17)
There were 1 test script error(s).
Failed tests:
1) Crumb returns view with crumb:
this.push is not a function
at TestStream._read (/Users/brandoncook/hapijs/crumb/test/index.js:146:46)
at Readable.read (_stream_readable.js:328:10)
at resume_ (_stream_readable.js:718:12)
at doNTCallback2 (node.js:439:9)
at process._tickDomainCallback (node.js:394:17)
1 of 11 tests failed
Test duration: 459 ms
Assertions count: 62 (verbosity: 5.64)
No global variable leaks detected
Coverage: 99.20% (1/125)
lib/index.js missing coverage on line(s): 150
Code coverage below threshold: 99.20 < 100
Linting results: No issues
npm ERR! Test failed. See above for more details.
from crumb.
Also fails locally for me. This code should clearly fail.
from crumb.
Clearly?
"When readable._read() is called, if data is available from the resource, the implementation should begin pushing that data into the read queue using the this.push(dataChunk) method. _read() should continue reading from the resource and pushing data until readable.push() returns false."
from crumb.
Yes, except the this
is in no way referring to the stream, that's just impossible.
from crumb.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
from crumb.
Related Issues (20)
- How does the check between the cookie and the header actually work? HOT 5
- Publish version 7.2.0 to npm HOT 6
- Getting a deprecation warning when installing HOT 2
- cookie not being parsed into request.headers instead still in request.state.crumb HOT 2
- unable to implement crumb for csrf protection in application with api's developed using hapi and front end developed using angular HOT 3
- Suggest to secure cookie by default in documentation HOT 3
- Change module namespace HOT 1
- Action required: Greenkeeper could not be activated 🚨 HOT 1
- Update deps HOT 1
- Update joi HOT 1
- Per-Request VS Per-Session option? HOT 4
- support legacy cookies for samesite policy in iframe HOT 1
- Only node 12
- Change plugin name to @hapi/crubm
- Drop hapi v17 and v18
- isSecure settings are not working HOT 1
- Plugin strips security headers HOT 3
- Unable to add crumb token to payload with h2o2 proxy HOT 3
- HMAC based token pattern
- PUT / DELETE requests don't do crumb validation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crumb.