Chai: Document supported browsers

Created on 21 Dec 2012  路  9Comments  路  Source: chaijs/chai

We're running into some trouble running our test suite for Thorax with chai. IE9 is fine, but we get this error on IE8:

" Object doesn't support property or method 'create' "

In addition we had to replace to.be.true with to.be['true'] etc.

It would be a nice addition to the website to know which versions of what browsers chai officially supports.

docs fun-size pull-request-wanted

Most helpful comment

It's come up a few times recently, so I'm going to try to push this issue a little more forward.

Here are my 2c about the whole browser support thing:

I think, given we're a testing framework, we need to support a broad range of versions. But also, given our limited person power, we need to be relatively conservative. I think supporting every engine that is officially supported by their respective vendors is a happy and relatively non-arbitrary point to fix to (Node, Firefox, Chrome, Opera, Safari, Edge, IE)

This means supporting Node 0.10 until October 1st or thereabouts, and 0.12 until the end of this year. IE wise, this means supporting IE9 until April 2017 (when Vista's extended support ends), IE10 and above for longer. For Firefox we'll support whatever the ESR version is, plus latest. Chrome, Opera and Safari only officially support their latest versions, so we'll do the same. All of these versions should run through CI so we know we're not breaking them.

I think in addition to all of that, we should provide what I'll call "soft" support for other versions. By soft support I mean if someone files an issue, we'll attempt to fix it - but sweeping architectural changes or large fixes will not be considered. This means users are welcome to try to use Chai in unsupported browsers, and if they encounter breakages, feel free to report them - however, also acknowledge that we might close issues saying we don't have manpower to provide the support you're after.

All 9 comments

In short, we currently do not support IE<=8, and the should interface only works in IE10. IE9 should be fine for assert/expect, given your mentioned tweaks for reserved words.

We do provide the test suite online so that you can test Chai's availability in your browser.

When we planned Chai 1.x we were really focussing on building an extensible library and promoting the plugin concept. As Chai's user base grown, the requests for legacy support have really grown and we are not ignoring this. As we plan out Chai's next major release (2.0), this will play a big role. Keep an eye our Google Group for the 2.0 roadmap and a call for pre-release testers in early January.

In the meantime, please bear with us as we hash out the details. Thanks!

@logicalparadox is there any progress on this? We've got an upcoming project which will needs to target IE8 and our unit test suite is still entirely in Chai.

I'd also would love to see a solution for this. Our customers also rely heavily on IE8 and we really would love to use chai for our IE8 tests.

+1

:+1:

:+1:

:+1:

I ripped out all the stuff that needed ES5 and provide Chai's assert API in a way that works in IE8 (maybe even IE6): https://github.com/jokeyrhyme/assertive-chai.js
Take a look if you like Chai's assertions and need IE8 compatibility.

It's come up a few times recently, so I'm going to try to push this issue a little more forward.

Here are my 2c about the whole browser support thing:

I think, given we're a testing framework, we need to support a broad range of versions. But also, given our limited person power, we need to be relatively conservative. I think supporting every engine that is officially supported by their respective vendors is a happy and relatively non-arbitrary point to fix to (Node, Firefox, Chrome, Opera, Safari, Edge, IE)

This means supporting Node 0.10 until October 1st or thereabouts, and 0.12 until the end of this year. IE wise, this means supporting IE9 until April 2017 (when Vista's extended support ends), IE10 and above for longer. For Firefox we'll support whatever the ESR version is, plus latest. Chrome, Opera and Safari only officially support their latest versions, so we'll do the same. All of these versions should run through CI so we know we're not breaking them.

I think in addition to all of that, we should provide what I'll call "soft" support for other versions. By soft support I mean if someone files an issue, we'll attempt to fix it - but sweeping architectural changes or large fixes will not be considered. This means users are welcome to try to use Chai in unsupported browsers, and if they encounter breakages, feel free to report them - however, also acknowledge that we might close issues saying we don't have manpower to provide the support you're after.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jockster picture jockster  路  4Comments

qbolec picture qbolec  路  5Comments

liborbus picture liborbus  路  4Comments

basherr picture basherr  路  4Comments

sverrirs picture sverrirs  路  3Comments