CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

Can't start interactive shell

Open ebuster opened this issue 10 years ago • 16 comments

Newly installed version (2.7) from NPM crashes on $ codeceptjs shell with error:

String interactive shell for current suite...
/usr/lib/node_modules/codeceptjs/lib/command/interactive.js:18
recorder.finishHandler(() => event.dispatcher.emit(event.test.teardown));
         ^
TypeError: recorder.finishHandler is not a function
...

ebuster avatar Feb 22 '16 13:02 ebuster

Same problem with me:

> $ codeceptjs shell
Test root is assumed to be /xxx/
String interactive shell for current suite...

TypeError: recorder.finishHandler is not a function

sotaan avatar Feb 25 '16 13:02 sotaan

@DavertMik I have had a look at this: it appears that event.js does not have test.teardown event.js only has

test: {
started: 'test.start',
before: 'test.before',
after: 'test.after',
failed: 'test.failed',
}

I don't know what you wanted to do with event.test.teardown maybe you can have a look at it

I also have this issue in version 0.2.8 when I run codeceptjs shell

fabioel avatar Mar 08 '16 16:03 fabioel

Same here

ltdangle avatar Mar 29 '16 20:03 ltdangle

I have the same @0.3.3

dmydry avatar Apr 09 '16 12:04 dmydry

same @"codeceptjs": "^0.3.3" & "node": "^5.5.0":

$ ./node_modules/.bin/codeceptjs shell 
Test root is assumed to be /test
String interactive shell for current suite...
/test/node_modules/codeceptjs/lib/command/interactive.js:18
  recorder.finishHandler(() => event.dispatcher.emit(event.test.teardown));
           ^

TypeError: recorder.finishHandler is not a function
    at Command.module.exports (/test/node_modules/codeceptjs/lib/command/interactive.js:18:12)
    at Command.listener (/test/node_modules/codeceptjs/node_modules/commander/index.js:301:8)
    at emitTwo (events.js:100:13)
    at Command.emit (events.js:185:7)
    at Command.parseArgs (/test/node_modules/codeceptjs/node_modules/commander/index.js:615:12)
    at Command.parse (/test/node_modules/codeceptjs/node_modules/commander/index.js:458:21)
    at Object.<anonymous> (/test/node_modules/codeceptjs/bin/codecept.js:80:9)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)

zeuben avatar Apr 19 '16 08:04 zeuben

Is this project alive or not.. 4 month since this issue and not even fixed, one of basic features just not working because of it.

aldarund avatar Jun 11 '16 14:06 aldarund

Same

sheerun avatar Aug 28 '16 16:08 sheerun

That's strange, it was fixed in 0.4.x. Did you update to latest version?

DavertMik avatar Aug 28 '16 17:08 DavertMik

That's strange, it was fixed in 0.4.x. Did you update to latest version?

DavertMik avatar Aug 28 '16 17:08 DavertMik

@DavertMik Pretty sure it wasn't:

cat node_modules/codeceptjs/package.json | jq .version
"0.4.3"
cat node_modules/codeceptjs/lib/command/interactive.js | grep recorder
let recorder = require('../recorder');
  recorder.start();
  recorder.finishHandler(() => event.emit(event.test.teardown));
  recorder.finalize();
cat node_modules/codeceptjs/lib/recorder.js | grep finishHandler
# Nothing ...

sheerun avatar Aug 28 '16 18:08 sheerun

Yeah, sorry. Looks like there was major change in API and shell was not updated. I'm working on it now

DavertMik avatar Aug 28 '16 18:08 DavertMik

Done #219 Version 0.4.4 released

DavertMik avatar Aug 28 '16 19:08 DavertMik

Maybe introducing flowjs to this project would solve such issues :)

sheerun avatar Aug 28 '16 20:08 sheerun

Thanks, for the suggestion. I will surely do this

DavertMik avatar Aug 29 '16 16:08 DavertMik

Does flowJS work with raw ES6 code without adding type annotations? Also is there any kind of CI that will perform static code analysis?

DavertMik avatar Aug 29 '16 16:08 DavertMik

Yes, you can use weak mode that doesn't require annotations, but it checks much less than strict mode.

I don't think there's specific CI, but you can run flow on travis.

sheerun avatar Aug 29 '16 17:08 sheerun