chai: Use ES6 Proxy to throw on non-existing assertions

With ES6 proxies it should be possible to have the following:

expect(someVariable).to.exiist;

throw which would remove one of the reasons why assertions on property access are problematic.

This will still need to work in browsers not supporting ES6 proxies (now: all browsers but this will soon change).

Refs #56.

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

The obvious solution would be to introduce a breaking change and require all assertions to be actual function calls

This is the obvious and right solution imo. It’d be a breaking change, sure, but it’d be worth it.