Skip to content

Commit

Permalink
Add NodeJS hello world to e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMerrill committed Nov 6, 2023
1 parent 70169b3 commit 15ba426
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/e2e/e2e.bash
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if [ ! -d "$FS" ]; then
./build/tools/fakefsify e2e_out/alpine.tar.gz "$FS"
echo "###### Configuring iSH and installing base libraries"
grep -E "^nameserver" /etc/resolv.conf | head -1 | $ISH /bin/sed -n "w /etc/resolv.conf"
$ISH /bin/sh -c "apk update && apk add build-base python2 python3"
$ISH /bin/sh -c "apk update && apk add build-base python2 python3 nodejs"
;;
No) exit 1;;
esac
Expand Down
1 change: 1 addition & 0 deletions tests/e2e/hello/expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ Hello, sh!
Hello, Python 2!
Hello, Python 3!
Hello, C!
Hello, NodeJS!
3 changes: 3 additions & 0 deletions tests/e2e/hello/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ python3 test_python3.py

gcc test_c.c -o ./hello_c
./hello_c

# node stdout is weird and scary
node test_node.js | cat
1 change: 1 addition & 0 deletions tests/e2e/hello/test_node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log('Hello, NodeJS!');

0 comments on commit 15ba426

Please sign in to comment.