Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

42 cohort methods test #47

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

42 cohort methods test #47

wants to merge 2 commits into from

Conversation

syroBx
Copy link
Collaborator

@syroBx syroBx commented Dec 19, 2024

Cover steps test for #42

  • steps_range
  • eval_step_filters
  • next_step

@syroBx syroBx self-assigned this Dec 19, 2024
@syroBx syroBx closed this Dec 19, 2024
@syroBx syroBx reopened this Dec 19, 2024
Copy link
Member

@galachad galachad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few small comments from me, please take a look.

expect_equal(steps_range(3,2),character(0))
})

test_that("eval_step_filters from Step.R returns empty character when step id is equal", {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not specify file name, usually using function name is enoght.

Suggested change
test_that("eval_step_filters from Step.R returns empty character when step id is equal", {
test_that("eval_step_filters returns empty character when step id is equal", {

@@ -831,6 +831,19 @@ test_that("Defining and accessing description works fine", {
)
})

test_that("steps_range from Step.R returns empty character when from is greater than to", {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test_that("steps_range from Step.R returns empty character when from is greater than to", {
test_that("steps_range returns empty character when from is greater than to", {


test_that("pair_seq requires an even number of indexes", {
# If odd length input is provided, function should fail due to indexing error
expect_error(pair_seq(c(1, 2, 3)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expect_error function can use regex, for check an error, worth to verify if it make sense to use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants