From 758d83aa09156bd11d32a5ae713cab90c87b6fa0 Mon Sep 17 00:00:00 2001 From: Garric Nahapetian <31713341+tinder-garricnahapetian@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:57:09 -0700 Subject: [PATCH] Improve test Co-authored-by: Christopher Fuller --- Tests/LayoutTests/ViewLayoutItemTests.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Tests/LayoutTests/ViewLayoutItemTests.swift b/Tests/LayoutTests/ViewLayoutItemTests.swift index d406d7aa..2e42256c 100644 --- a/Tests/LayoutTests/ViewLayoutItemTests.swift +++ b/Tests/LayoutTests/ViewLayoutItemTests.swift @@ -28,12 +28,17 @@ final class ViewLayoutItemTests: XCTestCase { layoutItems.append(layoutItem) return [constraint] } + // THEN + + expect(viewLayoutItem.layoutItemView) == view + + // WHEN + let superviewConstraints: [NSLayoutConstraint] = viewLayoutItem.superviewConstraints(superview) // THEN - expect(layoutItems === [superview]) == true - expect(viewLayoutItem.layoutItemView) == view expect(superviewConstraints === [constraint]) == true + expect(layoutItems === [superview]) == true } }