Samsung / Dexter

Dexter is a static analysis platform to find and remove defects efficiently and immediately during the coding-time.
BSD 2-Clause "Simplified" License
56 stars 33 forks source link

[monitor] Cannot run Mocha tests #79

Closed KarolAntczak closed 8 years ago

KarolAntczak commented 8 years ago

When I try to run Mocha tests for dexter-monitor, I've got a following error:

/opt/dexter/dexter-monitor/test/front-end/test-defectByProjectCtrl.js:28
    beforeEach(module('dexterMonitorApp'));
               ^

TypeError: module is not a function
    at Suite.<anonymous> (/opt/dexter/dexter-monitor/test/front-end/test-server-service.js:30:16)
    at context.describe.context.context (/usr/local/lib/node_modules/mocha/lib/interfaces/bdd.js:47:10)
    at Object.<anonymous> (/opt/dexter/dexter-monitor/test/front-end/test-server-service.js:26:1)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at /usr/local/lib/node_modules/mocha/lib/mocha.js:220:27
    at Array.forEach (native)
    at Mocha.loadFiles (/usr/local/lib/node_modules/mocha/lib/mocha.js:217:14)
    at Mocha.run (/usr/local/lib/node_modules/mocha/lib/mocha.js:469:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/mocha/bin/_mocha:404:18)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3
marchpig commented 8 years ago

Hi Karol,

Please try

Dexter/project/dexter-monitor$ npm test

or

Dexter/project/dexter-monitor$ gulp test-front-end

KarolAntczak commented 8 years ago

Thanks, it works now :)