run tests after server restarted after code changed

I have grunt-nodeunit task with watcher and nodemon. So when I do any changes to files grunt-nodeunit and nodemon starts working simultaneously. While grunt-nodeunit executes tests nodemon restarts server. So I got some fake failed tests. How to run tests after server restarts?

My grunt config:

 grunt.initConfig({
    nodeunit: {
        all: ['./test.nodeunit/**/*.coffee']

    },
    watch: {
       all: {
            files: ['**/*.coffee', '**/*.jade'],
            tasks: ['nodeunit']
        }
    }
});

My nodemon configured in package.json:

"start": "nodemon app.js"