If it's only a Liver function test on it's own then you can eat before the test as I've had many Liver function tests over the last few years and was told not to fast but if you're not entirely sure then give your surgery a ring like Grazer says.
Hope this helps
Paul