Elektrine lite

← Feed

@paulshryock@phpc.social

Post #3966708

2026-07-20 18:35 UTC

Here's what it looks like to write tests. You can create any *.test.sh file inside ./tests/. Write a test like this: ```bash it "should _____" $(test _____) ``` And if you want, you can wrap one or more tests inside a describe block, nested as many layers deep as you like: ```bash describe "when ____" it "should _____" $(test _____) enddescribe ```

Replies (1)

  • @paulshryock@phpc.social 2026-07-26 18:57

    Since any good testing framework should probably have assertions, I've created an `expect_to_be` function which compares numbers, strings, arrays, and dictionaries. ```bash it "should compare two words" $(expect_to_be yes no) ``` (The above example would fail because `yes` and `no` are not the same.)

    Open ##4118940