Skip to content

Handle nested and quoted paths in JSON key navigation#5699

Merged
sksamuel merged 14 commits intokotest:masterfrom
jeggy:master
Feb 23, 2026
Merged

Handle nested and quoted paths in JSON key navigation#5699
sksamuel merged 14 commits intokotest:masterfrom
jeggy:master

Conversation

@jeggy
Copy link
Copy Markdown
Contributor

@jeggy jeggy commented Feb 19, 2026

This fixes shouldNotContainJsonKey for when it fails and throws an unhelpful exception.

it.shouldNotContainJsonKey("$.validation_constraints['layout_items[0].url']")

Would just throw this:

Property has not been closed - missing closing '
com.jayway.jsonpath.InvalidPathException: Property has not been closed - missing closing '
	at com.jayway.jsonpath.internal.path.PathCompiler.fail(PathCompiler.java:642)
	at com.jayway.jsonpath.internal.path.PathCompiler.readBracketPropertyToken(PathCompiler.java:625)
	at com.jayway.jsonpath.internal.path.PathCompiler.readNextToken(PathCompiler.java:137)
	at com.jayway.jsonpath.internal.path.PathCompiler.readPropertyOrFunctionToken(PathCompiler.java:256)
	at com.jayway.jsonpath.internal.path.PathCompiler.readNextToken(PathCompiler.java:153)
	at com.jayway.jsonpath.internal.path.PathCompiler.readDotToken(PathCompiler.java:175)
	at com.jayway.jsonpath.internal.path.PathCompiler.readNextToken(PathCompiler.java:143)
	at com.jayway.jsonpath.internal.path.PathCompiler.readContextToken(PathCompiler.java:123)

@jeggy jeggy requested a review from a team as a code owner February 19, 2026 19:35
Copy link
Copy Markdown
Member

@Kantis Kantis left a comment

Choose a reason for hiding this comment

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

Thanks!

@sksamuel sksamuel enabled auto-merge February 19, 2026 21:02
Copy link
Copy Markdown
Member

@AlexCue987 AlexCue987 left a comment

Choose a reason for hiding this comment

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

very nice!

@jeggy
Copy link
Copy Markdown
Contributor Author

jeggy commented Feb 20, 2026

Hi, I'm unsure what to do with all these tests getting stuck? They are running for multiple hours

@AlexCue987
Copy link
Copy Markdown
Member

Hi, I'm unsure what to do with all these tests getting stuck? They are running for multiple hours

I don't think you need to do anything, we'll get it merged.

@sksamuel sksamuel disabled auto-merge February 23, 2026 04:17
@sksamuel sksamuel merged commit f014814 into kotest:master Feb 23, 2026
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.

4 participants