Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot fix test to recompute the hash both with Go and Javascript so that the hardcoded value does not get invalidated on each build. |
…value Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Updated the test to dynamically compute the hash from both Go and JavaScript implementations. The test now runs Commit: 9433571 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…-a52f-4df5-a7df-a6bfb891cd71
There was a problem hiding this comment.
Pull request overview
This PR fixes a failing cross-language hash validation test by replacing a hardcoded expected hash value with dynamic computation from the Go reference implementation. This eliminates the maintenance burden of manually updating hash values whenever workflow files change and ensures robust cross-language validation.
Changes:
- Modified the cross-language validation test in
frontmatter_hash_github_api.test.cjsto dynamically execute the Go test implementation and extract the hash from its output - Replaced hardcoded hash value with dynamic execution using
execSyncto rungo test -run TestHashWithRealWorkflow - Enhanced logging to show both JavaScript and Go computed hashes for better debugging
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The
frontmatter_hash_github_api.test.cjscross-language validation test was failing because the hardcoded expected hash no longer matched the computed hash from both Go and JavaScript implementations.Changes
actions/setup/js/frontmatter_hash_github_api.test.cjsto dynamically compute the expected hash by running the Go test implementationgo test -run TestHashWithRealWorkflow ./pkg/parser/and extracts the hash from the outputImplementation
The test now uses
execSyncto run the Go test and extract the hash dynamically:Benefits
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.