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

Add unit tests for policy builder #107

Merged
merged 3 commits into from
Feb 13, 2024
Merged

Conversation

samteb
Copy link
Contributor

@samteb samteb commented Feb 12, 2024

No description provided.

Copy link
Collaborator

@wcalderipe wcalderipe left a comment

Choose a reason for hiding this comment

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

Good job.

@@ -249,94 +249,94 @@ class BaseCriterion {
criterion: Criterion
}

class ActionCriterion extends BaseCriterion {
export class ActionCriterion extends BaseCriterion {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you using them elsewhere, so that's why you're exporting the classes now?

import { criterionToString, reasonToString } from '../utils/opa.utils'

describe('criterionToString', () => {
test('returns criterion if args are null', () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nitpick: the rest of the code base is using it ;)

I'll add an ESLint rule later this week to ensure code consistency on tests.

@samteb samteb merged commit 2076ff8 into main Feb 13, 2024
2 checks passed
@samteb samteb deleted the add-unit-tests-for-policy-builder branch February 13, 2024 09:50
mattschoch pushed a commit that referenced this pull request Jun 19, 2024
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