Skip to content

Commit d7efc4d

Browse files
committed
chore: set -euo pipefail to all tests/unit
1 parent 0cbb089 commit d7efc4d

12 files changed

Lines changed: 12 additions & 0 deletions

tests/unit/assert_snapshot_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function test_successful_assert_match_snapshot() {
45
assert_empty "$(assert_match_snapshot "Hello World!")"

tests/unit/assert_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function test_successful_fail() {
45
true || fail "This cannot fail"

tests/unit/clock_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
__ORIGINAL_OS=""
45

tests/unit/console_results_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function mock_all_state_getters() {
45
mock state::is_duplicated_test_functions_found echo false

tests/unit/directory_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function test_successful_assert_directory_exists() {
45
local a_directory

tests/unit/file_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function test_successful_assert_file_exists() {
45
local a_file

tests/unit/helpers_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function tear_down() {
45
helper::unset_if_exists fake_function

tests/unit/redirect_error_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
_ERROR_LOG=temp_error.log
45

tests/unit/setup_teardown_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
TEST_COUNTER=1
45

tests/unit/skip_todo_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
set -euo pipefail
23

34
function test_skip_output() {
45
assert_equals\

0 commit comments

Comments
 (0)