glucose tolerance test?

Kealeigh
So today I had my 26w appointment with the midwife and was told I have to go back on Tuesday to complete the test. Now I am not allowed to eat for 10 hours and then have to sit in my GP for 2 hours. They said I'm not allowed to go home. Does anyone know why this is? Also why is this test done? My midwife didn't explain?