-
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
[IMPORTANT] Upcoming Frisby v2.0 #316
Comments
A quick question: basically v2 will have less connection with Jasmine, so would it be possible to use Frisby with QUnit or another testing framework as well? |
Yes, that is the idea. The current provided expectations use Node.js's built-in |
@vlucas are there any changes with after and afterjson hooks ? I am not able to use them with my tests. |
Currently |
@vlucas I am starting with some experiments with frisby v2 using several test engines, so I tried to write a failing test. But even using Jasmine I don't see the test failing. Am I missing something? 'use strict';
const frisby = require('frisby');
const testHost = 'http://httpbin.org';
describe('Frisby', function() {
it('Test expectStatus works as... well, expected', function(doneFn) {
frisby.fetch(testHost + '/ip')
.expect('status', 400)
.done(doneFn);
});
}); |
@dnperfors Yes - there are some issues with Jasmine and async tests in v2. It will fail properly if you run it with |
@vlucas My response returns array of offers, with earlier version I was able to use path like this for expectJSONType .expectJSONTypes('offers.*', { but now on using with frisby 2.0 I get error
Can you help with this ? |
Can you make a reproducible test using |
This is test code var frisby = require('frisby');
var Joi = frisby.Joi;
describe("a suite", function () {
it('should match JSON with nested structure and single path', function (doneFn) {
frisby.fromJSON({
"offers": [{"name": "offer1"}, {"name": "offer2"}]
})
.expect('jsonTypes', 'offers.*', {
"name": Joi.string()
})
.done(doneFn);
})
})
; Stacktrace
|
This has been fixed - sorry for the issues here. I also added a |
@vlucas Yes thank you this works. I see that assertions in expectJson are not reported if they pass, although if checks fail this is reported in number of failed assertions. |
Also I see that timeout function is missing which was there in previous version, can we add it ? |
@vlucas I try to get V2 by using command
I got error ENOENT. May be the syntax is not good ? |
Looks like a local permissions issue. The top line says "checkPermissions: Missing write access to ". I was just able to install Frisby v2 locally, so it works. |
Are there any ETAs for the RC version at least? |
There is no ETA for v2, but I hope to put an initial beta or RC release out in early August. The current v2 code already has nearly the same amount of features as v1, but there are a few more things to do. The v2 code is also already more stable and better functioning than v1 as well, if you want to get an early start. I have multiple code bases already using Frisby v2 (so I can dogfood it), and the API won't be changing much because I don't want to redo all the tests ;) |
Thank you! Will an RC be released on NPM? |
Yes - It will be released on NPM when the time comes. |
Question on v2: Will v1 still be supported? As we always have test cases implemented in v1 which we would like to run continuously without any changes (or minimal change) ? |
@vlucas Would be great if you could be more transparent in what is going on in Frisby v2.0. What would help:
|
@vlucas Could you perhaps tag the current v2.0 branch as an "alpha"? |
Hi, what the status of this version 2? |
it died already |
v2 is not dead... just stalled. I will look at tagging the branch as "alpha" so people can at least play around with it a bit more easily. |
I just tagged an alpha release:
UPDATE: Use Please play with it and file an issue here if you find anything broken or unexpected. |
v2 is here, and has been moved to the |
Hi! |
The docs are at: https://www.frisbyjs.com/http.html |
I write what I noticed.
add params.
``` is displayed at the end. |
I have started on a new version of Frisby.js that will be released as v2.0 in the "v2" branch of the Frisby.js project on GitHub. Final timeline is unknown at this point, but it has very good progress, and I am already using it in some of my own personal projects with great success.
The main goal is to re-focus on what Frisby does best, give you more control over the Jasmine test structure, and to never nest Jasmine test contexts so issues like the custom matcher functions not working never happen - i.e. issues #93 #94 #307, etc.
Changes in v2.0
With v2.0, Frisby tests will now sit inside your own Jasmine test, and Frisby will only make HTTP requests and run assertions on the response. This gives you a lot more control over the test itself, and gives you the ability to use Jasmine's other methods for flow control, like
beforeAll
,beforeEach
, etc.Example:
I will have a lot more details later with a full rundown of all the features, but with all the stagnant issues piling up, I just wanted to give everyone a heads up on what's going on with this project.
Using v2 Now
If you want to use Frisby.js v2 now, you can install it by targeting the GitHub v2 branch:
If you want to help build the next version of Frisby, pull requests are welcome.
What happens to v0.85?
Unfortunately, the core issues often reported here are not fixable with the current API since Frisby wraps and generates the entire Jasmine test for you. This is very limiting in a lot of ways, and nested Jasmine tests is the largest of these very limiting and unfixable issues. Additionally, the release of Jasmine 2.0 has put the release process on hold since a lot of things have changed, and the main dependency of
jasmine-node
has still not released an official stable version for Jasmine 2.0.Therefore, given the poor API design, the current unfixable issues related to that, and the fact that Frisby.js is over 4 years old in its current form and stuck on Jasmine v1.0, the current release will probably be the last in the v0.x series, and the current v0.x code will be abandoned and replaced with the v2.x branch.
The text was updated successfully, but these errors were encountered: