describe('alphabet topic generate', function () { it('should always length 4', function () { alphabet().subject.length.should.equal(4) }) _(100).times(_ => { alphabet().subject.indexOf('`').should.equal(-1) }) })
let t = new MathTopic() t._randOperator() _(100).times(function () { should(['+', '-'].indexOf(t._operator) > -1).be.exactly(true) }) _(100).times(function () { should(['2', '二'].indexOf(MathTopic._randStringify(2)[0]) > -1).be.exactly(true) }) let t = new MathTopic() t._operator = '+' _(100).times(function () { t._rand() should(t._leNum < 31).be.exactly(true) let t = new MathTopic() t._operator = '-' _(100).times(function () { t._rand() should(t._leNum <= 50).be.exactly(true)