# autopkgtest hooks
if test ! -e node_modules/util.promisify; then
	for d in `ls debian/tests/test_modules`; do
		ln -s ../debian/tests/test_modules/$i node_modules/$i
	done
fi
# Upstream test uses npm to test, workaround:
mkdir -p tests/node_modules/.bin node_modules
if test -L dist; then
	rm -f dist
	cp -r /usr/share/nodejs/ts-node/dist .
fi
ln -s ../../../dist/bin.js tests/node_modules/.bin/ts-node
ln -s ../../../dist/bin-script-deprecated.js tests/node_modules/.bin/ts-script
ln -s ../../../dist/bin-script.js tests/node_modules/.bin/ts-node-script
ln -s ../../../dist/bin-transpile.js tests/node_modules/.bin/ts-node-transpile-only

# TEST
mocha dist/index.spec.js
