[Feature]: Testdeck supports jest, can we add link to it?
See original GitHub issue🚀 Feature Proposal
Testdeck now supports jest.
It allows tests to be written in OOP style using decorators:
import { suite, test } from "@testdeck/jest";
import { expect } from 'chai';
@suite
class Hello {
@test
world() {
expect(false).to.be.true;
}
}
I would love to get some feedback and list the @testdeck/jest
somewhere deep in the testdeck docs. This was initially authored for mocha as the mocha-typescript
, but since we abstracted the underlying test runner and it now works with mocha, jest and jasmine. Here is where mocha listed it: https://github.com/mochajs/mocha/wiki#interfaces--reporters
Motivation
The main motivation is OOP first developers coming from Java, C#, Objective-C etc. to JavaScript default to preferring object oriented patterns to functional patterns. TypeScript decorators and class syntax enabled enabled using classes to define tests. The OOP syntax also allows some test fixtures to be defined in base classes and then be extended reusing the base functionality. With functional suites can not easily inherit and extend other suites, instead of inheritance devs should use composition.
Example
The @testdeck/jest
exposes test UI that can be utilized like:
import { suite, test } from "@testdeck/jest";
import { expect } from 'chai';
@suite
class Hello {
@test
world() {
expect(false).to.be.true;
}
}
Pitch
This feature does not belong to the jest core platform. (or you may decide to implement similar UI) I am asking if we can add a link to the custom UI library in the jest docs, like we did with mocha.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top GitHub Comments
Looking at Mocha’s wiki, I thought
@testdeck/jest
fits perfectly insideawesome-jest
list. It is already there together with many other great projects and resources: https://github.com/jest-community/awesome-jest#library-extensionsThis issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.