7.0.0-alpha.1 • Published 4 years ago

@after-work.js/preset-plugin v7.0.0-alpha.1

Weekly downloads
701
License
MIT
Repository
github
Last release
4 years ago

after-work.js

CircleCI Renovate enabled 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
CommandDescriptionAliasDefaultExperimental
nodeRun tests in node.x
cdpRun tests in Chrome (chrome devtools protocol).chrome
protractorRun tests with Protractor.ptor
serveServe files.
puppeteerRun tests with Puppeteer.puppetx

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

npm.io

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.

Publish to npm

  1. npx lerna version --exact --no-push --no-git-tag-version --force-publish
  2. Update all @after-work.js/* dependencies in the root package.json to match the new version
  3. git commit -m "chore(release): publish vX.Y.Z"
  4. git tag -a vX.Y.Z -m "vX.Y.Z"
  5. npx lerna publish from-git
  6. git push --follow-tags
7.0.0-alpha.1

4 years ago

6.0.14

4 years ago

7.0.0-alpha.0

4 years ago

6.0.13

4 years ago

6.0.12

4 years ago

6.0.11

4 years ago

6.0.10

5 years ago

6.0.9

5 years ago

6.0.8

5 years ago

6.0.7

5 years ago

6.0.6

5 years ago

6.0.5

5 years ago

6.0.4

5 years ago

6.0.3

5 years ago

6.0.2

5 years ago

6.0.1

5 years ago

6.0.0

5 years ago

5.1.4

5 years ago

5.1.2

5 years ago