Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR synchronizes test suites from upstream Google Jsonnet repositories and improves test error reporting. It adds a comprehensive sync script for keeping test suites in sync with upstream, updates error messages for better clarity, fixes YAML parsing behavior for empty/blank input, and enhances the test framework to collect and report all failures at once rather than stopping at the first failure.
Changes:
- Added
sync_test_suites.shscript to automate syncing test files from google/jsonnet and google/go-jsonnet repositories - Enhanced test failure reporting to collect and summarize all failures instead of failing immediately
- Updated
std.parseYamlto returnnullfor empty/blank input instead of empty object - Improved
std.flatMaperror messages and added new test cases for type checking
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| sync_test_suites.sh | New bash script to sync test suites from upstream repositories, excluding lint/formatter files |
| refresh_golden_outputs.sh | New script to regenerate golden files using sjsonnet |
| BaseFileTests.scala (jvm-native) | Added failure collection mechanism and summary reporting for better test diagnostics |
| BaseFileTests.scala (js) | Added failure collection mechanism and summary reporting for JS platform |
| FileTests.scala (jvm-native) | Added deep_array_nesting test to skip list and calls to printSummaryAndAssert |
| FileTests.scala (js) | Added calls to printSummaryAndAssert for consistent test reporting |
| StdFlatMapTests.scala | Updated test to match improved error message for flatMap on strings |
| ManifestModule.scala | Changed parseYaml to use isBlank instead of isEmpty for consistency with upstream |
| ArrayModule.scala | Updated flatMap error messages to be more descriptive |
| Platform.scala (all platforms) | Changed yamlToJson to return ujson.Null instead of ujson.Obj() for empty input |
| stdlib.jsonnet | Added regression test for parseYaml with empty input |
| Various test files | Added new test cases and golden files for flatMap type checking, digit separators, and other features |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sjsonnet/test/resources/test_suite/error.flatMap_array_typecheck.jsonnet.golden
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ports:
google/go-jsonnet#849
google/go-jsonnet#853
google/jsonnet#1291
google/jsonnet#1284