Express.js and Zombie.js - cannot parse Javascript assets

I have an Express.js application that uses connect-asssets to serve JS and CSS:

 app.configure(function() { app.set('port', 3000); app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'ejs'); app.use(connectAssets({src: path.join(__dirname, 'assets')})); }); 

I try to use Zombie.js for acceptance testing, but keep getting SyntaxError: Unexpected token ILLEGAL whenever it tries to parse a Javascript file. If you replace connect-assets with express.static , then acceptance tests will work just fine.

Any idea what connect-assets does differently to disable Zombie.js?

0
source share
1 answer

So, I fulfilled the requests through Charles . Zombie sends the Accept-Encoding: identity request header, but connect-assets still returns GZIP data.

I raised the issue with connect-file-cache on Github, hope everything works fine once that is fixed.

+1
source

All Articles