Skip to content

Исправить CanInjectContext_As_Symbols после добавления WriteJSONDate - #1720

Merged
EvilBeaver merged 1 commit into
developfrom
cursor/fix-native-compiler-test-count-99ed
Aug 15, 2026
Merged

Исправить CanInjectContext_As_Symbols после добавления WriteJSONDate#1720
EvilBeaver merged 1 commit into
developfrom
cursor/fix-native-compiler-test-count-99ed

Conversation

@EvilBeaver

@EvilBeaver EvilBeaver commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Проблема

Тест CanInjectContext_As_Symbols падал с ошибкой:

Expected scope.Methods to contain 3 item(s), but found 4.

После merge PR #1711 в GlobalJsonFunctions появился четвёртый метод с атрибутом [ContextMethod]ЗаписатьДатуJSON / WriteJSONDate, но ожидаемое количество методов в тесте не обновили.

Решение

  • Заменено HaveCount(3) на HaveCount(4)
  • Добавлена проверка наличия метода ЗаписатьДатуJSON в области символов
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Tests
    • Updated compiler validation to cover an additional injected date-writing method.
    • Expanded expectations to confirm four injected methods are available.

После добавления WriteJSONDate в GlobalJsonFunctions (PR #1711) в области
символов стало 4 метода вместо 3. Обновлён счётчик и добавлена проверка
наличия ЗаписатьДатуJSON.

Co-authored-by: Andrei Ovsiankin <EvilBeaver@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0d058018-61f5-415a-83f7-34c10f11c0af

📥 Commits

Reviewing files that changed from the base of the PR and between 6af8bb5 and 7c41a0c.

📒 Files selected for processing (1)
  • src/Tests/OneScript.Core.Tests/NativeCompilerTest.cs

📝 Walkthrough

Walkthrough

The symbol-injection test now expects four injected methods and verifies that ЗаписатьДатуJSON is available alongside ЗаписатьJSON.

Changes

Symbol injection validation

Layer / File(s) Summary
Injected method expectations
src/Tests/OneScript.Core.Tests/NativeCompilerTest.cs
The test expects four injected methods and checks for ЗаписатьДатуJSON.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 7c41a

This localized test-only change updates the expected method count and verifies the newly added JSON date method; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Заголовок точно описывает исправление теста CanInjectContext_As_Symbols после добавления метода WriteJSONDate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/fix-native-compiler-test-count-99ed

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EvilBeaver
EvilBeaver marked this pull request as ready for review August 15, 2026 11:28
@sonar-openbsl-ru-qa-bot

Copy link
Copy Markdown

@EvilBeaver
EvilBeaver merged commit a065cce into develop Aug 15, 2026
3 of 4 checks passed
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