Files
30-seconds-of-code/test/get/get.test.js
Angelos Chalaris 17fb304f04 Codacy issue fixes
2018-06-18 21:18:53 +03:00

11 lines
348 B
JavaScript

const expect = require('expect');
const get = require('./get.js');
test('get is a Function', () => {
expect(get).toBeInstanceOf(Function);
});
const obj = { selector: { to: { val: 'val to get' } } };
test('Retrieve a property indicated by the selector from an object.', () => {
expect(get(obj, 'selector.to.val')).toEqual(['val to get']);
});