Skip to content

Commit

Permalink
Testem middleware
Browse files Browse the repository at this point in the history
Closes #7

Depends upon ember-cli/ember-cli#2128
  • Loading branch information
bcardarella authored and jakecraige committed Nov 4, 2014
1 parent 9ff54d0 commit 3f05985
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@ module.exports = {
},
serverMiddleware: function(options) {
this.project.liveReloadFilterPatterns.push('tests/fixtures/proxy');
var app = options.app;
options = options.options;

if (options.proxy) {
options.srcDir = path.join(this.project.root, 'tests/fixtures/proxy');
app.use(middleware(options));
if (options.options.proxy) {
this.middleware(options.app, options.options);
}
},
middleware: function(app, options) {
options.srcDir = path.join(this.project.root, 'tests/fixtures/proxy');
app.use(middleware(options));
},
testemMiddleware: function(app) {
this.middleware(app, {});
},
postprocessTree: function(type, tree) {
var treeTestLoader = pickFiles(tree, {
files: ['test-loader.js'],
Expand Down

0 comments on commit 3f05985

Please sign in to comment.