Skip to content

Conversation

@takejohn
Copy link
Member

What

test/syntax.tsmetaテストスイートにおいて、
getMeta()関数が返すMapに、AiScriptの値を比較するeq()関数ではなくexpect().toStrictEqual()を使用するようにします。

Why

eq()関数は、渡された2つのオブジェクトのtypeプロパティとvalueプロパティにアクセスし、それぞれが等しいことを検証します。
Mapにはtypeプロパティとvalueプロパティが存在しないため、
eq()関数によってundefinedが取り出され、常に検証が成功するようになっています。
expect().toStrictEqual()を使用することで正しくMapの内容を比較するようになります。

Additional info (optional)

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
see 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@takejohn takejohn requested a review from FineArchs December 16, 2025 01:28
@takejohn takejohn merged commit e1bc4b0 into aiscript-dev:master Dec 17, 2025
4 checks passed
@takejohn takejohn deleted the fix/test-syntax-meta-eq branch December 17, 2025 05:58
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.

4 participants