Skip to content

Commit 613c242

Browse files
Merge branch 'main' into fix-test-doubles
2 parents 378b48d + 1b1ff46 commit 613c242

59 files changed

Lines changed: 1895 additions & 3162 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,25 @@ end_of_line = lf
55
insert_final_newline = true
66
charset = utf-8
77
trim_trailing_whitespace = true
8-
9-
[**.sh]
108
indent_style = space
119
indent_size = 2
10+
11+
[**.sh]
1212
max_line_length = 120
1313

1414
[**.md]
15-
indent_style = space
1615
indent_size = 4
1716

1817
[**.ts]
19-
indent_style = space
20-
indent_size = 2
2118
max_line_length = 120
2219

2320
[**.css]
24-
indent_style = space
25-
indent_size = 2
2621
max_line_length = 120
2722

28-
[**.json]
29-
indent_style = space
30-
indent_size = 2
31-
3223
[docs/**.md] # YAML support
3324
indent_size = 2
3425

35-
[{Makefile,**.mk}]
26+
[{Makefile,**.mk,.git*}]
3627
indent_style = tab
3728

3829
[{tests/acceptance/**.sh,src/console_header.sh}]

.github/CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ Please make sure you have [set up your username and email address](https://git-s
3636
## Specific set up for documentation application
3737

3838
Our documentation is build with [VitePress](https://vitepress.dev/), for set up a local environment to contribute follow these steps:
39-
1. You'll need `node` (_we recommend using [nvm](https://github.com/nvm-sh/nvm)_) and `yarn` for set up the environment.
39+
1. You'll need `node` (_we recommend using [nvm](https://github.com/nvm-sh/nvm)_) and `npm` for set up the environment.
4040
* Using `nvm` you can execute `nvm use`(reads _.nvmrc_ file) in the project root directory and follow the instructions to use the correct `node` version.
41-
* To use `yarn` you need to execute `corepack enable` to activate [Corepack](https://nodejs.org/api/corepack.html).
42-
2. Install dependencies with `yarn install`.
43-
3. Run local development server with `yarn docs:dev`.
41+
2. Install dependencies with `npm ci`.
42+
3. Run local development server with `npm run docs:dev`.
4443
4. Implement your changes.
45-
5. Before submitting your Pull Request run `docs:build` to ensure everything works.
44+
5. Before submitting your Pull Request run `npm run docs:build` to ensure everything works.
4645

4746
## Change the configuration
4847
To change the configuration for the project we use the `.env` file if you would like to know what variables should be there use the following command:

.github/workflows/check-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ jobs:
2626
uses: actions/setup-node@v3
2727
with:
2828
node-version: 20
29-
cache: yarn
29+
cache: npm
3030
- name: Setup Pages
3131
uses: actions/configure-pages@v3
3232
- name: Install dependencies
33-
run: yarn install --immutable
33+
run: npm ci
3434
- name: Build with VitePress
3535
run: |
36-
yarn docs:build
36+
npm run docs:build
3737
touch docs/.vitepress/dist/.nojekyll

.github/workflows/deploy-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
uses: actions/setup-node@v3
2828
with:
2929
node-version: 20
30-
cache: yarn
30+
cache: npm
3131
- name: Setup Pages
3232
uses: actions/configure-pages@v3
3333
- name: Install dependencies
34-
run: yarn install --immutable
34+
run: npm ci
3535
- name: Build with VitePress
3636
run: |
37-
yarn docs:build
37+
npm run docs:build
3838
touch docs/.vitepress/dist/.nojekyll
3939
- name: Upload artifact
4040
uses: actions/upload-pages-artifact@v2

.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,8 @@
44

55
# docs
66
node_modules
7-
yarn-error.log
87
docs/.vitepress/cache
98
docs/.vitepress/dist
10-
.yarn/*
11-
!.yarn/cache
12-
!.yarn/patches
13-
!.yarn/plugins
14-
!.yarn/releases
15-
!.yarn/sdks
16-
!.yarn/versions
179

1810
# installation
1911
bin/bashunit

.yarn/releases/yarn-4.0.1.cjs

Lines changed: 0 additions & 893 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# Changelog
22

3-
## [Unreleased](https://github.com/TypedDevs/bashunit/compare/0.10.1...main)
3+
## [Unreleased](https://github.com/TypedDevs/bashunit/compare/0.11.0...main)
4+
5+
## [0.11.0](https://github.com/TypedDevs/bashunit/compare/0.10.1...0.11.0) - 2024-03-02
46

57
- Add `--upgrade` option to `./bashunit`
68
- Remove support to deprecated `setUp`, `tearDown`, `setUpBeforeScript` and `tearDownAfterScript` functions
79
- Optimize test execution time
10+
- Test functions are now run in the order they're defined in a test file
11+
- Increase contrast of test results
812

913
## [0.10.1](https://github.com/TypedDevs/bashunit/compare/0.10.0...0.10.1) - 2023-11-13
1014

LICENSE

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2023 Jose Maria Valera Reales <chema@typeddevs.com>
4-
Emmanuel Valverde Ramos <manu@typeddevs.com>
5-
Antonio Gonzalez Gea <antonio@typeddevs.com>
6-
Fabrizio Fasanando Sotelo <fabrizio@typeddevs.com>
3+
Copyright (c) 2023 TypedDevs <team@typeddevs.com>
74

85
Permission is hereby granted, free of charge, to any person obtaining a copy
96
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ SHELL=/bin/bash
44

55
STATIC_ANALYSIS_CHECKER := $(shell which shellcheck 2> /dev/null)
66
LINTER_CHECKER := $(shell which ec 2> /dev/null)
7+
GIT_DIR = $(shell git rev-parse --git-dir 2> /dev/null)
78

89
OS:=
910
ifeq ($(OS),Windows_NT)
@@ -36,16 +37,15 @@ endif
3637

3738
help:
3839
@echo ""
39-
@echo "usage: make COMMAND"
40+
@echo "Usage: make [command]"
4041
@echo ""
4142
@echo "Commands:"
42-
@echo " test Run the test"
43-
@echo " test/list List all the test under the tests directory"
44-
@echo " test/watch Automatically run the test every second"
45-
@echo " test/example Run test from the example directory"
46-
@echo " env/example Makes a copy of the keys on your .env file"
47-
@echo " pre_commit/install Installs the pre-commit hook"
48-
@echo " pre_commit/run Function that will be called when the pre-commit runs"
43+
@echo " test Run the tests"
44+
@echo " test/list List all tests under the tests directory"
45+
@echo " test/watch Automatically run tests every second"
46+
@echo " env/example Copy variables without the values from .env into .env.example"
47+
@echo " pre_commit/install Install the pre-commit hook"
48+
@echo " pre_commit/run Function that will be called when the pre-commit hook runs"
4949
@echo " sa Run shellcheck static analysis tool"
5050
@echo " lint Run editorconfig linter tool"
5151

@@ -68,32 +68,25 @@ test/watch: $(TEST_SCRIPTS)
6868
@fswatch -m poll_monitor -or $(SRC_SCRIPTS_DIR) $(TEST_SCRIPTS_DIR) .env Makefile | xargs -n1 ./bashunit $(TEST_SCRIPTS)
6969

7070
env/example:
71-
@echo "Copy the .env into the .env.example file without the values"
71+
@echo "Copying variables without the values from .env into .env.example"
7272
@sed 's/=.*/=/' .env > .env.example
7373

7474
pre_commit/install:
75-
@echo "Installing pre-commit hooks"
76-
cp $(PRE_COMMIT_SCRIPTS_FILE) ./.git/hooks/
75+
@echo "Installing pre-commit hook"
76+
cp $(PRE_COMMIT_SCRIPTS_FILE) $(GIT_DIR)/hooks/
7777

7878
pre_commit/run: test sa lint env/example
7979

8080
sa:
8181
ifndef STATIC_ANALYSIS_CHECKER
82-
@printf "\e[1m\e[31m%s\e[0m\n" "Shellcheck not installed: Static analisys not preformed!" && exit 1
82+
@printf "\e[1m\e[31m%s\e[0m\n" "Shellcheck not installed: Static analysis not performed!" && exit 1
8383
else
8484
@shellcheck ./**/*.sh -C && printf "\e[1m\e[32m%s\e[0m\n" "ShellCheck: OK!"
8585
endif
8686

8787
lint:
8888
ifndef LINTER_CHECKER
89-
@printf "\e[1m\e[31m%s\e[0m\n" "Editorconfig not installed: Lint not preformed!" && exit 1
89+
@printf "\e[1m\e[31m%s\e[0m\n" "Editorconfig not installed: Lint not performed!" && exit 1
9090
else
9191
@ec -config .editorconfig && printf "\e[1m\e[32m%s\e[0m\n" "editorconfig-check: OK!"
9292
endif
93-
94-
test/example:
95-
@./bashunit $(EXAMPLE_TEST_SCRIPTS)
96-
97-
test/watch/example:
98-
@./bashunit $(EXAMPLE_TEST_SCRIPTS)
99-
@fswatch -m poll_monitor -or $(EXAMPLE_TEST_SCRIPTS) | xargs -n1 ./bashunit $(EXAMPLE_TEST_SCRIPTS)

0 commit comments

Comments
 (0)