4 ms·
Ok. The guy writes about js fatigue. He appears to be chai.js maintainer. Ok, let's check it out. Oh, this is a library that lets you use three different styles
by perfunctory 8y ago
Ok. The guy writes about js fatigue. He appears to be chai.js maintainer. Ok, let's check it out. Oh, this is a library that lets you use three different styles to say the same thing
chai.should();
foo.should.be.a('string');
var expect = chai.expect;
expect(foo).to.be.a('string');
var assert = chai.assert;
assert.typeOf(foo, 'string');
Seriously? If this is not a major reason of js fatigue I don't know what is.
- aaaaaaaaaaab 8y agoLol, are these assert libs mimicking badly written English still a thing? I thought we grew out of this a few years ago.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- Gigablah 8y agoReally? All it takes for language fatigue is syntax? I’d hate to hear what you think of English.
- namelosw 8y agoAgreed. I'm pretty sure is one reason for the fatigue because some people just believe changing the word without changing semantic makes differences. For Chai, I also found RSpec/Jasmine/Chai styled testing is not much different from Minitest/Xunit/Tape test. Meanwhile, there was a hype of advertising so-called BDD interface several years ago. But there are still a lot of people testing detailed implementation instead of business value with RSpec styled testing framework. There are several things are pretty similar, I'm sure there's more: * Pretending BDD with RSpec styled testing, instead of testing business invariant. * Pretending continuous integration with Jenkins. Instead of incremental value delivery in high frequency. * Pretending agile software development with Jira and abused task-splitting. Instead of preserving e2e business value in one task.
- antonkm 8y agoThis is so much out of scope for the article - it has literally nothing to do with it. Your critique is about Chai choosing an API design you do not agree with. Your critique isn't focused on JS fatigue but a single lib. JS fatigue is about having to choose between Chai, Mocha, Karma (dead nowadays?), Tape, Istanbul, testdouble, Qunit etc. And also: knowing what does what.
- perfunctory 8y ago> Your critique is about Chai choosing an API design you do not agree with. I am not criticising the design choice but rather the inability to make a choice. > JS fatigue is about having to choose between Chai, Mocha, Karma... And once you made that choice you still have to choose between three different api styles, apparently.
- antonkm 8y agoYou're still mixing apples and pears. A single libs API is not JS fatigue. One could argue that it's actually the opposite; supporting three different APIs might make the transition from another lib easier.