Fix test cases that break the build

/to @bajtos 
This function is defined at two places, here and around L893. Please refactor so that there is only one copy of this function.

```js
beforeEach(enableXmlSupport);
```