Just use [`should`](https://github.com/visionmedia/should.js/) here:

```javascript
        err.should.be.an.instanceOf(Error);
        err.message.should.equal("Parse error on line 1:\n" +
          "...syntax error: {{foo }}}\n"+
          "-----------------------^\n" +
          "Expecting 'CLOSE', got 'CLOSE_UNESCAPED'");
        done();
```