Answer the question
In order to leave comments, you need to log in
What is jest test generator?
What are auto-generators of test templates based on ready-made classes?
For example, I have a class and it has a bunch of methods.
class Base {
sum(a, b) {
return a + b
}
showName() {
return 'John Doe'
}
}
module.exports = Base
const Base = require('./Base')
describe('Base class', () => {
it('test sum function', () => {
})
it('test showName function', () => {
})
})
Answer the question
In order to leave comments, you need to log in
I think no.
Quite a strange case. I always wrote tests by hand (not in js).
The case seems strange, since in general you will have to write several tests per method.
But if you really want to automate at least something - look at Property based testing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question