-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ToBeType matcher always return true #34
Comments
for a quick check, I've cloned this repo in a new folder. If I run frisby_mock_request_spec.js, all tests pass. I rerun this test ans it still passes |
I will take a look at this. This definitely should not be happening. |
Okay. I looked into this, and it's a bit weirder than the matcher not working. The matcher actually works perfectly. If you Example: So the issue is that the Jasmine expectation is failing, but Frisby is somehow ignoring it if not returned directly. Running a few tests, it also does not add to the assertion count. It's almost like it's being run in a separate context or something. I will continue to investigate this issue, but I just wanted to give you a heads up in the meantime. |
Thx for the update :) |
I have a similar problem, but in afterJSON |
Any word on this? It also seems to affect toBeTypeOrNull -- doesn't matter what you set it to Number, String, whatever... |
This still appears to be an issue. |
Seems like this is still the case for me too. I have some a json response as so: { doing a expect(val).toBeTypeOrNull(number/string/array/object) all work. |
Still happening, returning the expect function. Also happens with |
any updates on this ? |
I am working on the next version of Frisby, which will fix this issue. The main issue here is that Jasmine will not reliably run assertions in nested contexts. |
Fixed in v2. Please update. |
Example : testing a simple json like {title: 'my string'}
.expectJSON({title: function(val) { expect(val).toBeType(String); }}) => test pass
.expectJSON({title: function(val) { expect(val).toBeType(Number); }}) => test pass
.expectJSON({title: function(val) { expect(val).toBeType(Array); }}) => test pass
I
The text was updated successfully, but these errors were encountered: