Skip to content

test/add blueprint tests#74

Merged
solidsnakedev merged 1 commit into
mainfrom
test/add-blueprint-tests
Nov 26, 2025
Merged

test/add blueprint tests#74
solidsnakedev merged 1 commit into
mainfrom
test/add-blueprint-tests

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 26, 2025 00:33
@solidsnakedev solidsnakedev merged commit 17fc133 into main Nov 26, 2025
6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive test coverage for Plutus Blueprint (CIP-57) deserialization and provides tooling improvements for the blueprint code generation documentation. The changes include a new test suite validating Blueprint schema parsing, a sample blueprint JSON file for documentation, and a "Load Sample" feature in the blueprint codegen UI tool.

  • Introduces 6 test cases covering Blueprint schema deserialization, validation, and roundtrip encoding
  • Adds a comprehensive sample blueprint JSON with validators and type definitions
  • Enhances the blueprint codegen UI with a "Load Sample" button for quick testing

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/evolution/test/Blueprint.test.ts New test suite validating PlutusBlueprint schema deserialization, malformed data handling, required field validation, nested definition parsing, and roundtrip encoding/decoding
docs/public/sample-blueprint.json Sample Plutus blueprint JSON with v3 validators, type definitions, and nested schemas for use in documentation and testing
docs/next-env.d.ts Updated TypeScript reference path for Next.js route type definitions (potential issue with path correctness)
docs/app/tools/blueprint-codegen/blueprint-codegen.tsx Added loadSample function and "Load Sample" button to populate the blueprint input with sample data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


const loadSample = async () => {
try {
const response = await fetch('/sample-blueprint.json')
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

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

The fetch path /sample-blueprint.json uses an absolute path that will work in development but may fail in production when the site is deployed to GitHub Pages with a base path of /evolution-sdk. Consider using a relative path or constructing the path dynamically based on the environment's base path configuration to ensure the sample blueprint loads correctly in all deployment environments.

Suggested change
const response = await fetch('/sample-blueprint.json')
const response = await fetch('sample-blueprint.json')

Copilot uses AI. Check for mistakes.
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.

2 participants