-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathtest-e2e.sh
33 lines (30 loc) · 889 Bytes
/
test-e2e.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
npm pack
cd tests/e2e
export YARN_CACHE_FOLDER=.cache
cd node-js
rm -rf .cache
yarn init --yes
echo "Installing local bundle from TAR in NodeJS project"
yarn add ../../../imagekit*.tgz
node index.js;test_result=$?
echo $test_result
if [ "$test_result" != "0" ]; then
printf '%s\n' "Final bundle not working in NodeJS project" >&2
exit 1
fi
echo "Final bundle working in NodeJS project"
cd ../typescript
rm -rf .cache
yarn init --yes
yarn add typescript --dev
echo "Installing local bundle from TAR in Typescript project"
yarn add ../../../imagekit*.tgz
npx tsc && node index.js;test_result=$?
echo $test_result
if [ "$test_result" != "0" ]; then
printf '%s\n' "Final bundle not working in Typescript project" >&2
exit 1
fi
echo "Final bundle working in Typescript project"
rm -rf ../../../imagekit*.tgz