(time)
| 6587 | |
| 6588 | it('allows pre init hook to transform data (gh-15839)', async function() { |
| 6589 | const timeStringToObject = (time) => { |
| 6590 | if (typeof time !== 'string') return time; |
| 6591 | const [hours, minutes] = time.split(':'); |
| 6592 | return { hours: parseInt(hours), minutes: parseInt(minutes) }; |
| 6593 | }; |
| 6594 | |
| 6595 | const timeSchema = new Schema({ |
| 6596 | hours: { type: Number, required: true }, |