{"id":21283391,"url":"https://github.com/jg-rp/golden-liquid","last_synced_at":"2025-08-04T10:34:23.400Z","repository":{"id":113009534,"uuid":"431139760","full_name":"jg-rp/golden-liquid","owner":"jg-rp","description":"A test suite for the Liquid template language.","archived":false,"fork":false,"pushed_at":"2024-08-21T07:29:48.000Z","size":2111,"stargazers_count":5,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-21T08:46:48.063Z","etag":null,"topics":["liquid","liquid-templating-engine","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jg-rp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-23T14:50:15.000Z","updated_at":"2024-08-21T07:29:51.000Z","dependencies_parsed_at":"2023-12-15T08:23:41.474Z","dependency_job_id":"aa20904e-9aa8-434c-b8b3-64b8c3bc0f82","html_url":"https://github.com/jg-rp/golden-liquid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jg-rp%2Fgolden-liquid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jg-rp%2Fgolden-liquid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jg-rp%2Fgolden-liquid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jg-rp%2Fgolden-liquid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jg-rp","download_url":"https://codeload.github.com/jg-rp/golden-liquid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225715889,"owners_count":17512909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["liquid","liquid-templating-engine","testing"],"created_at":"2024-11-21T11:08:10.592Z","updated_at":"2025-07-11T11:30:53.671Z","avatar_url":"https://github.com/jg-rp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golden Liquid\n\nA test suite for [Liquid](https://shopify.github.io/liquid/), the safe, customer-facing template language for flexible web apps.\n\nThe tests defined in [golden_liquid.json](golden_liquid.json) attempt to cover the syntax and behavior of all **standard** tags and filters. This is a work in progress and will lag behind changes to [Shopify/Liquid](https://github.com/Shopify/liquid).\n\nTo use this test suite, it's recommended you embed this repository as a git [submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules) of your repository.\n\n- [Standard Liquid](#standard-liquid)\n- [Test File Schema](#test-file-schema)\n- [Test Tags](#tags)\n- [Contributing](#contributing)\n\n## Standard Liquid\n\nFor our purposes \"standard\" Liquid is the one described [here](https://shopify.github.io/liquid/) with [Shopify/Liquid](https://github.com/Shopify/liquid) being the reference implementation. Not to be confused with the extended variation of Liquid used for Shopify stores.\n\nAll tests pass with Shopify/liquid Ruby 3. If you have Ruby installed, you can run the test suite against the reference implementation by cloning this repository and running the following commands from the project root.\n\n```\nbundle install\nbundle exec rake\n```\n\n## Test file schema\n\n`golden_liquid.json` looks like this:\n\n```json\n{\n  \"description\": \"Golden Liquid test suite\",\n  \"tests\": [\n    {\n      \"name\": \"identifiers, ascii lowercase\",\n      \"template\": \"{% assign foo = 'hello' %}{{ foo }} {{ bar }}\",\n      \"data\": {\n        \"bar\": \"goodbye\"\n      },\n      \"tags\": [\n        \"strict\"\n      ],\n      \"result\": \"hello goodbye\"\n    },\n    .\n    .\n    .\n  ]\n}\n```\n\nIndividual test files and `golden_liquid.json` are validated against `golden_liquid.schema.json`. Each object in the `tests` array can include the following fields.\n\n- `name` - A descriptive name that uniquely identifies the test.\n- `template` - Liquid source text as a string.\n- `data` - A JSON object mapping strings to arbitrary, possibly nested, strings, numbers, arrays, objects and booleans. These are the variables that the associated template should be rendered with.\n- `result` - The expected result of rendering the template with the associated context data.\n- `results` - An array of possible expected results from rendering the template with the given context data.\n- `templates` - A JSON object mapping strings to strings. You can think of it as a mock file system for testing `{% include %}` and `{% render %}`.\n- `invalid` - A Boolean indicating if the test case should raise/throw an exception/error.\n- `tags` - An optional array of strings used to categorize the test case.\n\n## Tags\n\nTags are used to categorize test cases. This allows consumers of this test suite to easily exclude or target entire categories of tests, or enable/disable features in certain cases.\n\n- `strict` - Indicates that the test case should be parsed and rendered in strict mode, if a strict mode is available.\n- `absent` - Indicates that the test cases is asserting the absence of a feature. For example, the absence of a logical `not` operator.\n- `utc` - The test case assumes the host timezone is set to UTC\n\nPull requests to add or update tags are welcome.\n\n## Benchmark fixtures\n\nThe `benchmark_fixtures` folder contains Liquid templates and data useful for benchmarking Liquid engines. For each folder in `benchmark_fixtures`, the convention is that `data.json` contains render context data, and `templates/index.liquid` is the \"base\" template that might include/render other templates in the `templates` folder.\n\nPull requests for more benchmark fixtures are welcome.\n\n# Contributing\n\nSee [CONTRIBUTING.md](https://github.com/jg-rp/golden-liquid/blob/main/CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjg-rp%2Fgolden-liquid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjg-rp%2Fgolden-liquid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjg-rp%2Fgolden-liquid/lists"}