-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnumber.util.spec.js
24 lines (21 loc) · 963 Bytes
/
number.util.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const numberUtil = require('./number.util');
describe('vscode jumping with multiple empty lines in file we are stepping into, and sourcemaps are off', ()=> {
it('should add two numbers', ()=> {
const subtractedResult = numberUtil.subtractTwoNumbers(3, 1);
})
})
describe('vs code jumping with a line break and sourcemaps is on', ()=> {
it('should add two numbers', ()=> {
const numberUtilSpy = jest.spyOn(numberUtil, 'addTwoNumbers');
const addedResult = numberUtil.addTwoNumbers(1, 2);
expect(numberUtilSpy)
.toHaveBeenCalledTimes(1);
expect(addedResult).toEqual(3);
expect(numberUtilSpy).toHaveBeenCalledWith(1,2);
})
})
describe('vscode stepping into different code when there is a line break in the this file we are stepping in from and sourcemaps are off', ()=> {
it('should add two numbers', ()=> {
const subtractedResult = numberUtil.subtractTwoNumbers(3, 1);
})
})