Coder Social home page Coder Social logo

thiagodp / codeceptjs-cmdhelper Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 302 KB

๐Ÿ’ป Let your CodeceptJS tests run commands in the console/terminal

License: MIT License

JavaScript 100.00%
bdd codeceptjs command console execute run terminal test testing

codeceptjs-cmdhelper's People

Contributors

mirao avatar thiagodp avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

puneet0191 mirao

codeceptjs-cmdhelper's Issues

Helper stopped working in CodeceptJS 3.x: Error: Could not load helper CmdHelper from module

$ codeceptjs run --profile jobr --debug
(node:1889297) UnhandledPromiseRejectionWarning: Error: Could not load helper CmdHelper from module '/home/mirao/workspace/codeceptjs/node_modules/codeceptjs-cmdhelper':
Class extends value #<Object> is not a constructor or null
TypeError: Class extends value #<Object> is not a constructor or null
    at Object.<anonymous> (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs-cmdhelper/index.js:11:25)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at createHelpers (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:166:27)
    at Function.create (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:43:25)
    at Codecept.init (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/codecept.js:56:15)
    at createHelpers (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:181:13)
    at Function.create (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/container.js:43:25)
    at Codecept.init (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/codecept.js:56:15)
    at Command.module.exports (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/lib/command/run.js:22:12)
    at Command.listener (/home/mirao/workspace/codeceptjs/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:314:20)
    at Command.parseArgs (/home/mirao/workspace/codeceptjs/node_modules/commander/index.js:651:12)
    at Command.parse (/home/mirao/workspace/codeceptjs/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/home/mirao/workspace/codeceptjs/node_modules/codeceptjs/bin/codecept.js:189:9)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
(node:1889297) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:1889297) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

codecept.conf.js:

        CmdHelper: {
            require: "../../node_modules/codeceptjs-cmdhelper"
        }

Workaround/solution: (it helped me even for my custom helpers which worked in 2.6.11 and stopped working in 3.0.x):

  • Remove the line const Helper = require('codeceptjs').helper; from node_modules/codeceptjs-cmdhelper/index.js
    image

Used SW:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.