Fix defects that resulted in the order of items in the processing pipeli...

...ne to be changed.

The sort method for updating the processing middleware pipeline was occasionally rearranging the items (weren't getting assigned a middlewarePriority).  I've simplified the method by simply appending the new middleware to the end of the pipeline and then moving it to the appropriate place in the pipeline.

Also, got the tests working again by copying the missing file from grunt-contrib-watch
No, just a copy.  The tests don't run without it.  But they don't find it
if you just download grunt-express and try to work with it stand alone.

Try download just grunt-express into a fresh project space and you'll get
an error saying that it cannot find that file.  The test directory is not
downloaded in node_modules/grunt-contrib-watch.


On Thu, Jul 17, 2014 at 1:37 AM, Brian Lai <notifications@github.com> wrote:

> In test/helper.js:
>
> > @@ -1,2 +1,106 @@
> >  // reuse test/helper.js from `grunt-contrib-watch`
> > -var helper = module.exports = require('grunt-contrib-watch/test/tasks/helper');
>
> is this a modified copy of grunt-contrib-watch/test/tasks/helper?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/blai/grunt-express/pull/66/files#r15041827>.
>