Learn how to define unit tests in your Build file and then how to run your tests using Bazel.
This is a companion discussion topic for the original entry at https://www.kodeco.com/31558158-building-with-bazel/lessons/15
Learn how to define unit tests in your Build file and then how to run your tests using Bazel.
On building the tests, getting error:
ERROR: /Users/deepanshugautam/personal/build_tools/bazel/BazelBuild/Bullseye-iOS/BUILD:34:14: Compiling Swift module //Bullseye-iOS:tests failed: (Exit 1): worker failed: error executing command (from target //Bullseye-iOS:tests) bazel-out/darwin_arm64-opt-exec-2B5CBBC6-ST-521287fc850f/bin/external/build_bazel_rules_swift/tools/worker/worker swiftc ... (remaining 1 argument skipped)
error: emit-module command failed with exit code 1 (use -v to see invocation)
Bullseye-iOS/BullseyeTests/BullseyeTests.swift:8:8: error: no such module 'XCTest'
import XCTest
^
Bullseye-iOS/BullseyeTests/BullseyeTests.swift:8:8: error: no such module 'XCTest'
import XCTest
^