News for hackers. Stuff that matters.
Re:Chaijs.com just let their domain expire by andrew_ on Friday December 17, 2021 @10:25AM (#29593410)
Chai has unfortunately been left behind by its maintainers. My own personal attempts to contribute were met with silence and oddly-placed resistance (when I was able to get a response). It's been my opinion for a few years that Chai is obsolete tech, but it's still prolifically used in a lot of packages/libraries/etc that are in maintenance mode. There are just a lot of better alternatives now.
Re:Chaijs.com just let their domain expire by Keithamus on Friday December 17, 2021 @11:45AM (#29594673)
Sorry to hear that Andrew. If you'd like to point me to issues or PRs where you've contributed and don't feel like you had a good response, I'd be happy to follow up on them.
Re:Chaijs.com just let their domain expire by andrew_ on Friday December 17, 2021 @12:04PM (#29594941)
Appreciate the sentiment, but I moved on a long time ago to some tools that I feel better suit my needs. Nothing but love for the project and good on you for keeping it breathing.
Re:Chaijs.com just let their domain expire by o_____________o on Friday December 17, 2021 @10:47AM (#29593753)
What alternatives do you like?
Re:Chaijs.com just let their domain expire by andrew_ on Friday December 17, 2021 @11:07AM (#29594070)
I really enjoy Ava [1] or anything assert-tape-like [2]. "uvu" [3] is getting a lot of love lately, but it's very feature limited and much of it's touted advantages are at the detriment to feature set.

[1] https://github.com/avajs/ava

[2] https://github.com/substack/tape

[3] https://github.com/lukeed/uvu

Jest is great for front-end (or full stack integration) testing, but I feel it's specialized for that use-case and doesn't always play nice with backend/middle-tier testing needs.

Re:Chaijs.com just let their domain expire by krzkaczor on Friday December 17, 2021 @12:40PM (#29595480)
I like simplicity of mochajs but chai felt really outdated. Jest on the other hand is so complicated and magical that I have no confidence in tests that I write using it. That's why I've created earljs: https://earljs.dev/

It's a modern, fully typesafe chai replacement that works great with mocha. Very inspired by Jest (matchers, snapshots) but without magic that makes Jest hard to reason about.

Re:Chaijs.com just let their domain expire by horsawlarway on Friday December 17, 2021 @10:52AM (#29593831)
Jest.

The matchers cover basically all the same use cases.

Not to mention that jest's "expect.arrayContaining" and "expect.objectContaining" literally blow most other assertion libraries out of the water.

Re:Chaijs.com just let their domain expire by sombremesa on Friday December 17, 2021 @10:57AM (#29593910)
I don't know what kind of shop you're running where JS libraries are 'literally' getting blown out of water but I like it.
Re:Chaijs.com just let their domain expire by grumple on Friday December 17, 2021 @11:56AM (#29594831)
It would not surprise me if there's javascript running on nuclear subs. It's already made it to space: https://www.infoq.com/news/2020/06/javascript-spacex-dragon/
Re:Chaijs.com just let their domain expire by semi-extrinsic on Friday December 17, 2021 @04:12PM (#29598402)
In the trivial sense, sure, someone probably has a web browser on a nuclear sub. But if you're talking software written for the operation of the sub itself, I expect it's either Ada, C89 or C++.

Ada was, after all, developed specifically by the DoD for exactly such purposes.

Re:Chaijs.com just let their domain expire by hermanradtke on Friday December 17, 2021 @08:12PM (#29600426)
Jest as a test runner is very slow. I normally run mocha while importing the expects from jest.
Re:Chaijs.com just let their domain expire by 11235813213455 on Friday December 17, 2021 @12:01PM (#29594914)

  const { deepStrictEqual: same } = require('assert');