Add integration tests for Create Rocq Model and deps #16

Merged
marfavi merged 3 commits from add-more-tests into main 2026-10-09 13:45:53 +02:00
Owner
  • Cover the command end-to-end via shell integration
  • Test the files, logging and terminal dependencies
  • Re-create the log output channel after deactivate

fixes #12

- Cover the command end-to-end via shell integration - Test the files, logging and terminal dependencies - Re-create the log output channel after deactivate fixes #12
Add integration tests for Create Rocq Model and dependencies
All checks were successful
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m27s
Grammar / Corpus and binding tests (pull_request) Successful in 41s
884f1100c7
- Cover the command end-to-end via shell integration
- Test the files, logging and terminal dependencies
- Re-create the log output channel after deactivate
EatOreo approved these changes 2026-10-07 10:15:30 +02:00
@ -0,0 +81,4 @@
// directory of the open file. `clightgen` itself need not be
// installed for this to hold.
const expected = `cd ${path.dirname(document.fileName)} && clightgen -normalize model.c`;
assert.strictEqual(execution.commandLine.value, expected);
Owner

Jeg synes det er okay at vi bare tjekker at model.v eksisterer bagefter her og ellers fejler testen. Medmindre det er for besværligt at gøre clightgen også tilgængelig i CI. synes ikke det er worth it at lave en "fake" clightgen cli

Jeg synes det er okay at vi bare tjekker at model.v eksisterer bagefter her og ellers fejler testen. Medmindre det er for besværligt at gøre clightgen også tilgængelig i CI. synes ikke det er worth it at lave en "fake" clightgen cli
Author
Owner

Kigger på at installere clightgen i CI

Kigger på at installere clightgen i CI
Author
Owner

.. i en fremtidig branch

.. i en fremtidig branch
marfavi marked this conversation as resolved
@ -0,0 +42,4 @@
await vscode.commands.executeCommand(CREATE_ROCQ_MODEL_COMMAND_ID);
// The handler is synchronous; give the terminal event a chance to
// fire before asserting that no terminal was created.
await delay(500);
Owner

test might give success for the wrong reason when the terminal doesn't support shell integration (that introduces a delay of 3 sec)

test might give success for the wrong reason when the terminal doesn't support shell integration (that introduces a delay of 3 sec)
Author
Owner

OK, fixed by providing a fake model handler and listening on vscode events rather than waiting for a magic amount of time

OK, fixed by providing a fake model handler and listening on vscode events rather than waiting for a magic amount of time
marfavi marked this conversation as resolved
michael approved these changes 2026-10-07 10:57:56 +02:00
harden a test
All checks were successful
Grammar / Corpus and binding tests (pull_request) Successful in 48s
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m36s
80ffcac50e
marfavi force-pushed add-more-tests from 80ffcac50e
All checks were successful
Grammar / Corpus and binding tests (pull_request) Successful in 48s
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m36s
to 1f8aad9302
Some checks failed
Grammar / Corpus and binding tests (pull_request) Successful in 46s
Extension / Format, types, lint, extension tests (pull_request) Failing after 1m1s
2026-10-09 13:34:46 +02:00
Compare
Follow the dependencies→services rename
All checks were successful
Grammar / Corpus and binding tests (pull_request) Successful in 48s
Extension / Format, types, lint, extension tests (pull_request) Successful in 1m31s
00c6193952
Point the integration tests at commands/services, rename the test file to match,
and rename CreateRocqModelDependicies to CreateRocqModelServices.
marfavi deleted branch add-more-tests 2026-10-09 13:45:53 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code2rocq/crocq!16
No description provided.