const app = require('vn-loopback/server/server'); describe('Model getEnumValues()', () => { it('should extend getEnumValues properties to any model passed', () => { let exampleModel = app.models.TravelThermograph; expect(exampleModel.getEnumValues).toBeDefined(); }); it('should return an array of enum values from a given column', async() => { let result = await app.models.TravelThermograph.getSetValues('temperature'); expect(result.length).toEqual(3); expect(result[0].value).toEqual('enum'); expect(result[1].value).toEqual('COOL'); expect(result[2].value).toEqual('WARM'); }); });