1 | import TestLib from '../../src/test-lib';
|
2 |
|
3 | describe('TestLib', () => {
|
4 | describe('Greet function', () => {
|
5 | beforeEach(() => {
|
6 | spy(TestLib, 'greet');
|
7 | TestLib.greet();
|
8 | });
|
9 |
|
10 | it('should have been run once', () => {
|
11 | expect(TestLib.greet).to.have.been.calledOnce;
|
12 | });
|
13 |
|
14 | it('should have always returned hello', () => {
|
15 | expect(TestLib.greet).to.have.always.returned('bom dia, amigo');
|
16 | });
|
17 | });
|
18 | });
|