diff --git a/Tests/LibWeb/Layout/expected/flex-item-auto-height-with-wrap.txt b/Tests/LibWeb/Layout/expected/flex-item-auto-height-with-wrap.txt
new file mode 100644
index 0000000000..8dd4a54e86
--- /dev/null
+++ b/Tests/LibWeb/Layout/expected/flex-item-auto-height-with-wrap.txt
@@ -0,0 +1,11 @@
+Viewport <#document> at (0,0) content-size 800x600 children: not-inline
+ BlockContainer at (0,0) content-size 800x116 children: not-inline
+ Box
at (8,8) content-size 400x100 flex-container(column) children: not-inline
+ Box at (8,8) content-size 400x17.46875 flex-container(row) flex-item children: not-inline
+ BlockContainer <(anonymous)> at (8,8) content-size 348.609375x17.46875 flex-item children: inline
+ line 0 width: 348.609375, height: 17.46875, bottom: 17.46875, baseline: 13.53125
+ frag 0 from TextNode start: 0, length: 40, rect: [8,8 348.609375x17.46875]
+ "The orange box should have a snug height"
+ TextNode <#text>
+ BlockContainer <(anonymous)> at (8,8) content-size 0x0 children: inline
+ TextNode <#text>
diff --git a/Tests/LibWeb/Layout/input/flex-item-auto-height-with-wrap.html b/Tests/LibWeb/Layout/input/flex-item-auto-height-with-wrap.html
new file mode 100644
index 0000000000..3fcbdec589
--- /dev/null
+++ b/Tests/LibWeb/Layout/input/flex-item-auto-height-with-wrap.html
@@ -0,0 +1,18 @@
+The orange box should have a snug height