I used the following which significantly reduce the number of errors:

```javascript
expected_output = expected_output.replace(/(\r\n|\r)/g, '\n').replace(/\n$/g, '');
css = css.replace(/\n$/g, '');
```