Coder Social home page Coder Social logo

jahed / night-patrol Goto Github PK

View Code? Open in Web Editor NEW
7.0 4.0 1.0 1.35 MB

Interactive Test Tunner for Nightwatch. Run individual tests, re-run failures, switch environments, autocompletion, and more.

License: MIT License

JavaScript 1.00% TypeScript 99.00%
nightwatch vorpal test-runner night-patrol nightwatch-configuration

night-patrol's People

Contributors

jahed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

delfin86

night-patrol's Issues

Switch to TypeScript

The Babel dependencies are out of date after Babel 7 was released and no longer follow best practices like using preset-env. Also eslint is out of date and I prefer standard-js's simplicity.

Instead of upgrading Babel and eslint, this is a good opportunity to move the project over to TypeScript.

Watch for changes and reload

Currently, Night Patrol loads the configuration only on start up. This means changes to the test suite (new/removed test files, new/removed test cases, changes nightwatch config, etc.) aren't loaded in and requires the user to manually restart the executable. This is inconvenient. Ideally, watch for changes and reload the configuration whenever a change is detected.

To be safe and to keep it simple, any change should reload the entire configuration, not just parts of it, unless if this introduces performance issues.

Changes which should trigger a reload:

  • Changes to nightwatch config
  • Changes to any directory and children referenced by nightwatch config which is used by Night Patrol (just src_folders for now)
  • Changes to nightwatch executable (version check)

Remove Vorpal.js dependency

Vorpal.js is barely maintained and has out of date dependencies, some with security alerts (though it's mitigated by using more recent versions in night-patrol since they're caret versions).

Vorpal is just a layer over Inquirer so it can switch to that with some work.

Multiple src directories are not supported

Nightwatch supports setting src_folders to an array, but Night Patrol assumes it's always string.

suitesRoot: Path.resolve(config.src_folders),

$ night-patrol --config ./tests/nightwatch.config.js
path.js:39
    throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type object
    at assertPath (path.js:39:11)
    at Object.resolve (path.js:1088:7)
    at setNightwatchConfig (/home/jahed/repos/frontiernav/frontiernav/node_modules/night-patrol/dist/actions/nightwatch.js:73:40)
    at Object.<anonymous> (/home/jahed/repos/frontiernav/frontiernav/node_modules/night-patrol/dist/cli.js:208:46)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Module.require (internal/modules/cjs/loader.js:636:17)

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.