Codeceptjs: Can't start interactive shell

Created on 22 Feb 2016  路  16Comments  路  Source: codeceptjs/CodeceptJS

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
...

Most helpful comment

I have the same
@0.3.3

All 16 comments

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

@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

Same here

I have the same
@0.3.3

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)

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.

Same

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

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

@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 ...

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

Done #219
Version 0.4.4 released

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

Thanks, for the suggestion. I will surely do this

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ninpop25 picture ninpop25  路  10Comments

TestdeTester picture TestdeTester  路  10Comments

waryhermit picture waryhermit  路  12Comments

tony204 picture tony204  路  15Comments

philipstanislaus picture philipstanislaus  路  10Comments