#!/bin/sh
# Entry point used by both dh_auto_test and autopkgtest.
#
# Upstream runs its test suite with jest and ts-jest; both are packaged in
# Debian, so the suite is run as-is here rather than through a reimplementation.
# The configuration in jest.config.js points jest at the files upstream's own
# package.json would also pick up.
set -e

jest --config debian/tests/pkg-js/jest.config.js

# Finally check that the built module loads and works through the entry
# points package.json advertises.
node debian/tests/pkg-js/smoke.js
