(time)
| 6563 | |
| 6564 | it('allows pre init hook to transform data (gh-15839)', async function() { |
| 6565 | const timeStringToObject = (time) => { |
| 6566 | if (typeof time !== 'string') return time; |
| 6567 | const [hours, minutes] = time.split(':'); |
| 6568 | return { hours: parseInt(hours), minutes: parseInt(minutes) }; |
| 6569 | }; |
| 6570 | |
| 6571 | const timeSchema = new Schema({ |
| 6572 | hours: { type: Number, required: true }, |