#!/bin/sh
# autopkgtest: run the upstream test suite against the installed package.
#
# debian/tests/pkg-js/files ships only test/, so index.js is linked in from
# /usr/share/nodejs/webpack-stream by pkg-js-autopkgtest and the suite exercises
# the built .deb.  Upstream reaches the package as require('../'), which
# resolves to index.js next to the tests.
export LC_ALL=C

mkdir -p node_modules/vinyl-named
cp "$(dirname "$0")/vinyl-named.js" node_modules/vinyl-named/index.js
printf '{"name":"vinyl-named","version":"1.1.0","main":"index.js"}\n' \
	> node_modules/vinyl-named/package.json

exec node test/test.js
