Closed meeber closed 6 years ago
Can you also include https://github.com/producthunt/chai-enzyme please ?
@jeromemacias Thanks for the heads up! Just ran the test suite with Chai v4; no issues.
Hey friends! So, is anything left here @meeber?
We were thinking about releasing 4.0.0
and it would be good to avoid issues with any plugins.
All we've gotta do is make sure those PRs are merged when 4.0.0
gets released right?
There have been a number of commits in master since I tested these plugins. And we have a couple more on the way. I don't anticipate any new issues, but will need to test them again with the updated code for due diligence.
Assuming there aren't any additional issues: The plugins listed under "minor issues" already either have a PR ready to merge, or a PR that just needs the version updated once 4.0 is release, and then it can be merged. The plugins listed under "major issues" need more work. @astorije is already aware of some changes that impact chai-immutable
. chai-things
is broken since before v3.5 due to a conflict with Chai core regarding the any
flag; I don't think it's essential that we fix this prior to v4.0 release, but it's something we should look into going forward.
Development on chai-things has mostly stalled - in the current situation the featureset that chai-things really needs is not well catered for with chai's current plugin system. The proposed new system in https://github.com/chaijs/chai/issues/585 takes plugins like chai-things into account (hopefully).
@keithamus @vieiralucas @lucasfcosta @shvaikalesh @astorije I ran the test suites for all of these plugins using the second canary release. There were a couple of new small issues in dirty-chai
and chai-query
; I updated the PRs for those already. There was also a new breaking change in chai-immutable
due to #924; I updated the PR for that as well.
Finally, there's a new issue related to #900 that's causing three test suites to fail. Haven't had a chance to look into it in-depth, but it appears that the issue is related to mocha-phantomjs
choking on these lines. Specifically, Object.getOwnPropertyNames(testFn)
is including callee
in the result set, but then Object.getOwnPropertyDescriptor(testFn, name)
is returning undefined
when name
is callee
. That seems very odd; more investigation is needed. The affected repos are:
@keithamus @vieiralucas @lucasfcosta @shvaikalesh As mentioned above, several plugin test suites are failing in PhantomJS because of these lines:
var excludeNames = Object.getOwnPropertyNames(testFn).filter(function(name) {
return !Object.getOwnPropertyDescriptor(testFn, name).configurable;
});
I won't have enough cycles to troubleshoot this in depth for a couple weeks. If no one else does either, then I suggest we hack-fix it by checking that the return value of Object.getOwnPropertyDescriptor(testFn, name)
is defined before accessing its .configurable
property. Normally this shouldn't be necessary but something funky is clearly going on here; this hack should at least let the tests pass until we have a chance to investigate further.
Per #966, the PhantomJS 1.x issue is now resolved.
chai-immutable
, chai-as-promised
, chai-jquery
, and chai-http
.dirty-chai
can't be updated until chai-as-promised
releases a new version.chai-timers
was previously merged.chai-things
is still broken due to major issues that predate v4.0.I feel as though chai-things
will pretty much have to wait until #585 before it can get the abilities it needs from chai (and also the attention).
When checking for compatibility with Chai v4, I was using each plugin's master branch. Per https://github.com/chaijs/chai-spies/issues/71, the current npm release of chai-spies
is incompatible with Chai v4; we need to prioritize releasing a new version of that.
@meeber but according to what I've seen at that issue, chai-spies
master branch is already compatible with Chai v4, right?
Also, I think that we should focus on releasing chai-as-promised
too. I've been getting lots of requests to do that and I think that plugin is pretty important for our users.
I'm planning on releasing the v4 compatible versions of our plugins this sunday. If anyone wants to schedule a hangouts or a skype call so that we can get these done it would be awesome.
Also, I remember @keithamus sent us a link with instructions for releasing modules but I can't find it. It would be great if we could have that in order to get this going.
@lucasfcosta Right!
There is a (easily solvable, but annoying) issue with chai-json-schema using chai@4 on node@4 - see https://github.com/chaijs/chai-json-schema/issues/47
I went through the popular Chai plugins to see how their test suites fair with Chai v4. (Actually, I used the #884 build instead of the current canary release). Overall, we're in good shape. Here are my findings:
Major issues
chai-immutable
deep.property
tonested.property
. Also because of change in capitalization in values returned bytype-detect
. Also because.not.keys
was being treated implicitly as.not.any.keys
instead of.not.all.keys
. Further changes are likely needed due to change innot.property
.deep.property
tonested.property
, and to remove some of the.not.keys
tests since they no longer made sensepackage.json
needs updatingchai-things
any
flag in Chai coreany
flag in coreany
issueany
in core, which would happen to resolve this problemMinor issues
chai-as-promised
deep.property
tonested.property
package.json
needs updatingchai-jquery
undefined
is explicitly passed as the second parameter to theproperty
assertion, it asserts that the value value of the property equalsundefined
.chai-http
deep.property
tonested.property
package.json
needs updatingdirty-chai
package.json
needs updatingchai-timers
above
no longer accepts strings.No issues