tobe a number jest

Solutions on MaxInterview for tobe a number jest by the best coders in the world

showing results for - "tobe a number jest"
Isabel
15 Mar 2017
1test('name', () => {
2  // array
3  expect(Array.isArray(['value'])).toBe(true);
4  // string
5  expect(typeof 'value').toBe('string');
6  // object
7  expect({value: 'value'}).toBeTruthy();
8  expect(typeof {value: 'value'}).toBe('object');
9})