Public | Automated Build

Last pushed: a month ago
Short Description
Docker image providing javascript testing tools, and related plugins and configs
Full Description

Docker Image - Test - Js



:exclamation: Report issues and send Pull Requests in the main Docker Images repository :exclamation:

Introduction

Provides javascript testing tools, and related plugins and configs.

  • Node (Npm, Yarn)
  • Jest
    • Reporter: junit

Provides also useful development tools.

  • Goss
  • Make
  • Git

Permissions

Docker container runs commands as a "test" user, to which you can define id
and group id using USER_ID and GROUP_ID environment variables
(1000:1000 by default).

Integration

Jest

Run

DIR=`pwd`; docker run \
  --rm \
  --interactive --tty \
  --volume $DIR:$DIR \
  --workdir $DIR \
  --env USER_ID=`id -u` \
  --env GROUP_ID=`id -g` \
  manala/test-js \
  jest --help

Zsh function

jest() {
  DIR=`pwd`
  docker run \
    --rm \
    --interactive --tty \
    --volume $DIR:$DIR \
    --workdir $DIR \
    --env USER_ID=`id -u` \
    --env GROUP_ID=`id -g` \
    manala/test-js \
    jest "$@"
}

Zsh alias

alias jest='f() {
  DIR=`pwd`
  docker run \
    --rm \
    --interactive --tty \
    --volume $DIR:$DIR \
    --workdir $DIR \
    --env USER_ID=`id -u` \
    --env GROUP_ID=`id -g` \
    manala/test-js \
    jest "$@"
};f'

Script /usr/local/bin/jest

#!/bin/sh

DIR=`pwd`
docker run \
  --rm \
  --interactive --tty \
  --volume $DIR:$DIR \
  --workdir $DIR \
  --env USER_ID=`id -u` \
  --env GROUP_ID=`id -g` \
  manala/test-js \
  jest "$@"

Development

Requirements:

  • Docker
  • Make

Build

make build

Dev

make dev

Test

make test

Updates:

  • Check for new docker alpine node image version and update Dockerfile and goss.yaml accordingly
  • Check for new goss release and update Dockerfile accordingly
  • Check for new yarn release and update Dockerfile and goss.yaml accordingly
  • Check for new npm packages versions and update Dockerfile and goss.yaml accordingly
Docker Pull Command
Owner
manala
Source Repository