Implement NodeJS based server fully replicating osrm-routed

This commit is contained in:
Siarhei Fedartsou 2022-10-23 16:57:01 +02:00
parent 71a638a14f
commit 6dfb7d4ede

View File

@ -4,11 +4,16 @@ set -e
# we do not run `osrm-routed-js` tests on v12 since fastify doesn't support it # we do not run `osrm-routed-js` tests on v12 since fastify doesn't support it
NODE_VERSION=$(node --version) NODE_VERSION=$(node --version)
NODE_MAJOR_VERSION=$(echo $NODE_VERSION | cut -d. -f1) NODE_MAJOR_VERSION=$(echo $NODE_VERSION | cut -d. -f1)
if [[ $NODE_MAJOR_VERSION != "v12" ]]; then if [[ "$NODE_MAJOR_VERSION" != "v12" ]]; then
echo "Running osrm-routed-js tests"
export OSRM_USE_ROUTED_JS=1 export OSRM_USE_ROUTED_JS=1
node ./node_modules/cucumber/bin/cucumber.js features/ -p verify_routed_js node ./node_modules/cucumber/bin/cucumber.js features/ -p verify_routed_js
node ./node_modules/cucumber/bin/cucumber.js features/ -p mld_routed_js node ./node_modules/cucumber/bin/cucumber.js features/ -p mld_routed_js
unset OSRM_USE_ROUTED_JS unset OSRM_USE_ROUTED_JS
else
echo "Skipping osrm-routed-js tests on Node.js ${NODE_VERSION}"
fi
fi fi
node ./node_modules/cucumber/bin/cucumber.js features/ -p verify node ./node_modules/cucumber/bin/cucumber.js features/ -p verify