Skip to content
This repository was archived by the owner on Sep 10, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,7 @@ test_webpack:
test_mocha:
(cd tests/mocha && bazel test //...)

test_all: test_helloworld test_lyrics test_express test_namespace test_typescript test_webpack test_mocha
test_protobuf_js:
(cd tests/protobuf.js && bazel test //...)

test_all: test_helloworld test_lyrics test_express test_namespace test_typescript test_webpack test_mocha test_protobuf_js
18 changes: 18 additions & 0 deletions tests/protobuf.js/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package(default_visibility = ["//visibility:public"])

load("@org_pubref_rules_node//node:rules.bzl", "node_binary")

node_binary(
name = "app",
main = "app.js",
deps = [
"@yarn_modules//:protobufjs",
],
)

sh_test(
name = "protobuf_test",
size = "small",
srcs = ["protobuf_test.sh"],
data = [":app"],
)
15 changes: 15 additions & 0 deletions tests/protobuf.js/WORKSPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
local_repository(
name = "org_pubref_rules_node",
path = "../..",
)

load("@org_pubref_rules_node//node:rules.bzl", "node_repositories", "yarn_modules")

node_repositories()

yarn_modules(
name = "yarn_modules",
deps = {
"protobufjs": "6.8.0",
}
)
3 changes: 3 additions & 0 deletions tests/protobuf.js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const protobuf = require('protobufjs');

console.log('SUCCESS');
7 changes: 7 additions & 0 deletions tests/protobuf.js/protobuf_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
set -euo pipefail

if ./app | grep -q 'SUCCESS'; then
echo "PASS"
else
exit 1
fi