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

tests: init more scalable unit tests #22

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

Conversation

hsjobeki
Copy link

@hsjobeki hsjobeki commented Sep 6, 2024

When trying this tool i discovered some bugs. I think we can fix them. But it would also require more extensive testing to ensure that functions that works right now also stay intact.

So this adds unit tests inspired by https://github.com/nix-community/rnix-parser

  • Folders allow semantic grouping
  • Define a new test by just adding a new file.
test_data/
└── write <- name of the action
    └── simple_insert <- semantic grouping, each unit_test consists of three files:
        ├── empty_attrs.args      <- arguments: write("a", "1")
        ├── empty_attrs.expect  <- { a = 1;}
        ├── empty_attrs.nix        <- { }
        ├── existing_attrs.args
        ├── existing_attrs.expect
        └── existing_attrs.nix
        

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.

1 participant