Skip to content

feat(core): Add normalized() helper to Assertion base class#106

Merged
JoseLion merged 2 commits into
mainfrom
feat/normalized-helper
Aug 30, 2023
Merged

feat(core): Add normalized() helper to Assertion base class#106
JoseLion merged 2 commits into
mainfrom
feat/normalized-helper

Conversation

@JoseLion

Copy link
Copy Markdown
Contributor

This helper will allow classes extending from Assertion to create matcher methods which don't need the this.execure(..) method:

public someMatcher(): this {
  if (this.inverted) {
    // ...assert inverted somehow
  } else {
    // ...assert somehow
  }

  return this.normalized();
}

@JoseLion
JoseLion requested a review from ChristianSama August 29, 2023 18:01
@JoseLion JoseLion self-assigned this Aug 29, 2023
Comment thread packages/core/src/lib/Assertion.ts Outdated
}

/**
* A convenience method to normalized the assertion instance. If it was

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* A convenience method to normalized the assertion instance. If it was
* A convenience method to normalize the assertion instance. If it was

Typo

@ChristianSama ChristianSama left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@JoseLion
JoseLion merged commit a30ae44 into main Aug 30, 2023
@JoseLion
JoseLion deleted the feat/normalized-helper branch August 30, 2023 14:50
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants