GithubHelp home page GithubHelp logo

jnmacias / after-work.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from qlik-oss/after-work.js

0.0 1.0 0.0 6.41 MB

CLI for automated tests in web projects.

Home Page: https://aw.netlify.com/

License: MIT License

JavaScript 86.68% CSS 8.54% HTML 4.78%

after-work.js's Introduction

after-work.js

CircleCI Dependabot Status Coverage Status

after-work.js is an unified test framework highly configurable through cli and configuration files allowing tests to be executed in the desired context.

Requirements

Default runner

  • node: Node.js >= 8.9.4

Context dependent

  • cdp (Chrome Debugging Protocol): Chrome > 61
  • protractor (webdriver protocol): protractor 5.x + browser(s)
  • puppeteer (High-level Headless Chrome Node API - experimental): puppeteer

Introduction

after-work.js aims to be a tool that facilitates the testing while development or restructuring code. Designed for test and provide fast feedback on changed code and added testcases.

To configure after-work.js you need to start with an analyse of the code.

  • What context should it be executed in (Node.js, browser)
  • What type of tests should be executed (unit, component, integration, e2e)
  • Does the code have any dependencies to build or run (babel...)

Get started

Installation

Install the module using npm:

npm install --save-dev @after-work.js/aw

CLI entrypoint

after-work.js is CLI and consists of a command together with appropriate options Help is always available with the --help, -h option

npx aw -h
npx aw chrome -h
npx aw protractor -h
npx aw serve -h
npx aw puppeteer -h
Command Description Alias Default Experimental
node Run tests in node. x
cdp Run tests in Chrome (chrome devtools protocol). chrome
protractor Run tests with Protractor. ptor
serve Serve files.
puppeteer Run tests with Puppeteer. puppet x

All commands support passing a config file for all options.

npx aw -c ./path/to/aw.config.js

However, passing an option from command line will override the config file option.

npx aw -c ./path/to/aw.config.js --glob /path/that/overrides/glob/in/config/file

This enables easy debugging setup from modern editors for example Visual Studio Code

This will only run the current active file. And you don't have to worry about your tests timing out since after-work.js will automatically detect running a debugger and set the appropriate options accordingly.

Included Tools

The following tools are bundled into after-work.js:

  • Mocha: an extensible testing framework for TDD or BDD.
  • Chai: an assertion library used together with a JavaScript testing framework.
  • Sinon: a framework for standalone test spies, stubs and mocks for JavaScript.
  • Nyc: the Istanbul command line interface

Contributing

Please follow the instructions in CONTRIBUTING.md.

after-work.js's People

Contributors

stoffeastrom avatar greenkeeper[bot] avatar axelssonhakan avatar dependabot[bot] avatar wennmo avatar peol avatar qlikbez avatar cbt1 avatar carlioth avatar stefanwalther avatar

Watchers

Juan Macias avatar

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.