kafkajs

v1.12.0-beta.20
A modern Apache Kafka client for node.js
kafka sasl scram

jest

export KAFKA_VERSION=${KAFKA_VERSION:='2.3'} && NODE_ENV=test echo "KAFKA_VERSION: ${KAFKA_VERSION}" && KAFKAJS_DEBUG_PROTOCOL_BUFFERS=1 ./node_modules/.bin/jest

test:local

yarn jest --detectOpenHandles

test:debug

NODE_ENV=test KAFKAJS_DEBUG_PROTOCOL_BUFFERS=1 node --inspect-brk node_modules/.bin/jest --detectOpenHandles --runInBand --watch

test:local:watch

yarn test:local --watch

test

yarn lint && JEST_JUNIT_OUTPUT=test-report.xml ./scripts/testWithKafka.sh 'yarn jest --ci --maxWorkers=4 --no-watchman --forceExit'

lint

find . -path ./node_modules -prune -o -path ./coverage -prune -o -path ./website -prune -o -name '*.js' -print0 | xargs -0 ./node_modules/.bin/eslint

format

find . -path ./node_modules -prune -o -path ./coverage -prune -o -path ./website -prune -o -name '*.js' -print0 | xargs -0 ./node_modules/.bin/prettier --write

precommit

lint-staged

test:group:broker

yarn jest --forceExit --testPathPattern 'src/broker/.*'

test:group:admin

yarn jest --forceExit --testPathPattern 'src/admin/.*'

test:group:producer

yarn jest --forceExit --testPathPattern 'src/producer/.*'

test:group:consumer

yarn jest --forceExit --testPathPattern 'src/consumer/.*.spec.js'

test:group:others

yarn jest --forceExit --testPathPattern 'src/(?!(broker|admin|producer|consumer)/).*'

test:group:broker:ci

JEST_JUNIT_OUTPUT=test-report.xml ./scripts/testWithKafka.sh "yarn test:group:broker --ci --maxWorkers=4 --no-watchman"

test:group:admin:ci

JEST_JUNIT_OUTPUT=test-report.xml ./scripts/testWithKafka.sh "yarn test:group:admin --ci --maxWorkers=4 --no-watchman"

test:group:producer:ci

JEST_JUNIT_OUTPUT=test-report.xml ./scripts/testWithKafka.sh "yarn test:group:producer --ci --maxWorkers=4 --no-watchman"

test:group:consumer:ci

JEST_JUNIT_OUTPUT=test-report.xml ./scripts/testWithKafka.sh "yarn test:group:consumer --ci --maxWorkers=4 --no-watchman"

test:group:others:ci

JEST_JUNIT_OUTPUT=test-report.xml ./scripts/testWithKafka.sh "yarn test:group:others --ci --maxWorkers=4 --no-watchman"

test:types

tsc -p types/

Metadata

  • MIT
  • >=8.6.0
  • Tulio Ornelas
  • released 1/9/2020

Downloads

Maintainers