Functional testing

I am at the end of my Metric-Imperial Converter project but I’m having a rather strange issue with my functional tests. It doesn’t seem like the runner method is running them at all!
I can’ figure out why that might be. My unit test file is running fine but the functional tests are not running.

fs.readdirSync(testDir).filter(function(file){
    return file.substr(-3) === '.js';
// ADDS BOTH FILES HERE (unit tests and functional tests
}).forEach(function(file){
    mocha.addFile(
        path.join(testDir, file)
    );
});

var runner = mocha.ui('tdd').run()
    .on('test end', function(
        var body = test.body.replace(/\/\/.*\n|\/\*.*\*\//g, '');
        // collapse spaces
        body = body.replace(/\s+/g,' ');
        var obj = {
          title: test.title,
          context: context.slice(0, -separator.length),
          state: test.state,
          assertions: analyser(body)
        };
//obj contains all tests!
      console.log(obj)
        tests.push(obj);
    })

I have compared my code with similar work but I can’t spot the problem.
Please help if you know what the issue might be.

Thanks =)