Change to match template better
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
import {expect} from 'chai';
|
||||
import {main} from '../src';
|
||||
import {SampleClass} from '../src';
|
||||
|
||||
describe('index', () => {
|
||||
it('main', () => {
|
||||
const res = main();
|
||||
expect(res).to.be.deep.equal('Hello World');
|
||||
const cls = new SampleClass();
|
||||
const cases: [number, number, unknown][] = [
|
||||
[2, 3, 5],
|
||||
[2, 0, 2],
|
||||
[500, -10, 490],
|
||||
];
|
||||
for (const [a, b, res] of cases) {
|
||||
expect(cls.add(a, b)).to.be.deep.equal(res);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user