nchaulet / httpbackend

Http backend mock module for protractor
MIT License
28 stars 10 forks source link

Advanced respond options with variables #16

Open phenomnomnominal opened 8 years ago

phenomnomnominal commented 8 years ago

if I do something like

var data = require('foo.json');
whenGet( ... ).respond(function () {
    return [200, data, { some: 'header' }];
});

This is stringified and send to the client, where data obviously doesn't exist. I'm going to work on a PR to fix this.