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

Trigger specs cache indentation fix + documentation & tests #2094

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

Telroshan
Copy link
Collaborator

Description

Following up on #1540

  1. Indentation fix, as @1cg had suggested in the linked PR,

is it possible to eliminate the whitespace changes here to make the actual change clearer and then submit a whitespace fix in a separate PR?

  1. Added documentation & tests that I had omitted in the other PR

Testing

Added 2 tests

  • One that evaluates the same trigger strings as the parses spec strings test, but enables the cache, and make sure the cache was indeed used, expecting it to hold the same keys count as the evaluated example specs list
  • A second one that makes sure the cached specs are actually reused. It adds a dummy value to the evaluated specs, then evaluates trigger specs for a new element with the same trigger string, and makes sure the returned object is the same as the first one (i.e. was correctly cached and reused)

Checklist

  • I have read the contribution guidelines
  • I have targeted this PR against the correct branch (master for website changes, dev for
    source changes)
  • This is either a bugfix, a documentation update, or a new feature that has been explicitly
    approved via an issue
  • I ran the test suite locally (npm run test) and verified that it succeeded

@1cg 1cg merged commit 4057f9c into bigskysoftware:dev Dec 14, 2023
1 check passed
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