Skip to content

Add portable JSON compatibility fixtures - #13

Open
callumalpass wants to merge 2 commits into
obsidianmd:mainfrom
callumalpass:test/portable-compatibility-fixtures
Open

callumalpass wants to merge 2 commits into
obsidianmd:mainfrom
callumalpass:test/portable-compatibility-fixtures

Conversation

@callumalpass

Copy link
Copy Markdown

Hi @kepano.

Knap looks like a great project, and I'd be keen to use it as the templating system for a project that I'm currently working on, mdbase.

To use it there, I'd need a Rust implementation of Knap. I'd be keen to build and maintain one, and this PR is intended as a step towards making Knap's expectations easier to share among implementations and across languages.

This PR exports expectations from the Knap documentation and regression tests as JSON fixtures that can be reused in other implementations. The TypeScript tests also run against those fixtures, so all implementations would check themselves against the same expectations.

This PR should be understood to be a proposal for a test corpus rather than a complete specification. It captures existing expectations, but leaves some edge cases untested. I believe there are edge cases around type coercion, Unicode, regular expressions, dates and time zones, and serialization. Those areas may need additional test cases to establish expectations that implementations in different languages could reliably share. On the other hand, some of these edge cases might be sufficiently rare that leaving them unspecified would make implementations easier to build and maintain!

@bubba8587

Copy link
Copy Markdown

I'd be excited to see knap-mdbase synthesis!

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.

3 participants