[PR #41] [MERGED] Tests: move effecting code from description to setup #41

Closed
opened 2026-06-06 22:10:46 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/soldr-modules/pull/41
Author: @souz9
Created: 1/10/2023
Status: Merged
Merged: 1/16/2023
Merged by: @asdek

Base: masterHead: tests-fix-setup


📝 Commits (1)

  • 9093061 Tests: move effecting code from description to setup

📊 Changes

2 files changed (+52 additions, -47 deletions)

View changed files

📝 tests/file_remover_client_spec.lua (+50 -45)
📝 tests/proc_terminator_spec.lua (+2 -2)

📄 Description

Description of the Change

In tests, describe block is not supposed to contain any effecting code and can contain only other busted blocks: describe, setup, it... or simple declarative expressions (with no actual action).

Current implementation of the tests include running actions right inside of describe blocks that brakes such functionality of busted as busted --list, busted --run=test_name, etc.

The change moves the code with actual actions inside setup blocks.

How to test the Change

$ busted --list tests

Checklist:

  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/soldr-modules/pull/41 **Author:** [@souz9](https://github.com/souz9) **Created:** 1/10/2023 **Status:** ✅ Merged **Merged:** 1/16/2023 **Merged by:** [@asdek](https://github.com/asdek) **Base:** `master` ← **Head:** `tests-fix-setup` --- ### 📝 Commits (1) - [`9093061`](https://github.com/vxcontrol/soldr-modules/commit/909306160ced9e1d3fc68220f4d47bac2b47fbe5) Tests: move effecting code from description to setup ### 📊 Changes **2 files changed** (+52 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `tests/file_remover_client_spec.lua` (+50 -45) 📝 `tests/proc_terminator_spec.lua` (+2 -2) </details> ### 📄 Description ### Description of the Change In tests, `describe` block is not supposed to contain any effecting code and can contain only other busted blocks: `describe`, `setup`, `it`... or simple declarative expressions (with no actual action). Current implementation of the tests include running actions right inside of `describe` blocks that brakes such functionality of busted as `busted --list`, `busted --run=test_name`, etc. The change moves the code with actual actions inside `setup` blocks. ### How to test the Change ```shell $ busted --list tests ``` ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you are unsure about any of these, please ask for clarification. We are here to help! --> - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my change. - [x] All new and existing tests pass. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:10:46 -04:00
yindo closed this issue 2026-06-06 22:10:47 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/soldr-modules#41