mirror of
https://github.com/CodelyTV/pr-size-labeler.git
synced 2025-02-22 04:50:57 -05:00
* chore: add bashunit to the repo * chore: created folder for test and check that bashunit works * chore: snapshot for test_should_ignore_files_with_glob * chore: add pipeline * chore: snapshot update * git ignore bashunit, rather install it as vendor * chore: code style * chore: fix installed bashunit version --------- Co-authored-by: Chemaclass <chemaclass@outlook.es> Co-authored-by: katarn <katarn@katarn.es>
14 lines
396 B
Bash
14 lines
396 B
Bash
#!/bin/bash
|
|
|
|
function set_up() {
|
|
source ./src/misc.sh
|
|
source ./src/github.sh
|
|
}
|
|
|
|
function test_should_ignore_files_with_glob() {
|
|
local -r pr_number=123
|
|
local -r files_to_ignore=("*.lock" ".editorconfig")
|
|
mock curl cat ./tests/fixtures/test_should_ignore_files_with_regex_response
|
|
|
|
assert_match_snapshot "$(github::calculate_total_modifications "$pr_number" "${files_to_ignore[*]}")"
|
|
}
|