Skip to content

Add tests for web#129

Merged
westeezy merged 1 commit into
mainfrom
05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup
May 15, 2026
Merged

Add tests for web#129
westeezy merged 1 commit into
mainfrom
05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup

Conversation

@westeezy
Copy link
Copy Markdown
Contributor

@westeezy westeezy commented May 15, 2026

What changes are you making?

Adding more test coverage


Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated platforms/swift/CHANGELOG.md
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Android version?
  • I have bumped the versionName in platforms/android/lib/build.gradle
  • I have updated platforms/android/CHANGELOG.md
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

Copy link
Copy Markdown
Contributor Author

westeezy commented May 15, 2026

@westeezy westeezy force-pushed the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch from cde4b8a to 771da3a Compare May 15, 2026 05:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 98%
98.94% (561/567) 90.85% (149/164) 100% (55/55)

@westeezy westeezy changed the title Add checkout tests, coverage thresholds, and dead-code cleanup Add tests for web May 15, 2026
@westeezy westeezy marked this pull request as ready for review May 15, 2026 05:31
@westeezy westeezy requested a review from a team as a code owner May 15, 2026 05:31
@westeezy westeezy force-pushed the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch from 771da3a to 3e890ab Compare May 15, 2026 05:33
@westeezy westeezy force-pushed the 05-14-add_releasing_section_to_readme branch from 9ad8384 to 52b4da9 Compare May 15, 2026 14:31
@westeezy westeezy force-pushed the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch from 3e890ab to 26a4a08 Compare May 15, 2026 14:31
const template = createTemplate(html`<span>cloned</span>`);
const host = document.createElement("div");
host.append(template.content.cloneNode(true));
expect(host.querySelector("span")?.textContent).toBe("cloned");
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.

It's better when the tests are full deterministic

Suggested change
expect(host.querySelector("span")?.textContent).toBe("cloned");
expect(host.querySelector("span")!.textContent).toBe("cloned");

Comment on lines +35 to +42
it("concatenates static strings only", () => {
expect(html`<p>hello</p>`).toBe("<p>hello</p>");
});

it("interpolates SafeMarkup values between segments", () => {
const name = safe("<em>Westin</em>");
expect(html`hello ${name}!`).toBe("hello <em>Westin</em>!");
});
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.

Are we missing tests for unsafe cases?

@westeezy westeezy force-pushed the 05-14-add_releasing_section_to_readme branch 2 times, most recently from e7e5514 to 077a164 Compare May 15, 2026 15:37
@westeezy westeezy force-pushed the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch from 26a4a08 to fd31145 Compare May 15, 2026 15:38
@markmur markmur added the #gsd:50662 Rebase Checkout Kit on UCP label May 15, 2026
@westeezy westeezy changed the base branch from 05-14-add_releasing_section_to_readme to graphite-base/129 May 15, 2026 15:43
@westeezy westeezy force-pushed the graphite-base/129 branch from 077a164 to 07ec0be Compare May 15, 2026 15:43
@westeezy westeezy force-pushed the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch from fd31145 to 37a0079 Compare May 15, 2026 15:43
@graphite-app graphite-app Bot changed the base branch from graphite-base/129 to main May 15, 2026 15:44
@westeezy westeezy force-pushed the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch from 37a0079 to 179d2a7 Compare May 15, 2026 15:44
@westeezy westeezy merged commit 88da403 into main May 15, 2026
17 checks passed
@westeezy westeezy deleted the 05-15-add_checkout_tests_coverage_thresholds_and_dead-code_cleanup branch May 15, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants