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.TpvTransaction.getSetValues('status'); expect(result.length).toEqual(4); expect(result[0].value).toEqual('enum'); expect(result[1].value).toEqual('started'); expect(result[2].value).toEqual('ok'); expect(result[3].value).toEqual('ko'); }); });