Skip to content

Commit 5c8e04a

Browse files
committed
review fixes
1 parent 5aab01f commit 5c8e04a

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

docs-src/blog/2026-05-07-unit-test-export-frameworks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ The detailed option behavior and framework mapping are documented here:
9090
- PHPUnit: [phpunit.de](https://phpunit.de/)
9191
- Pest: [pestphp.com](https://pestphp.com/)
9292
- Kotest: [kotest.io](https://kotest.io/)
93+
- JUnit 5 Kotlin: [junit.org/junit5](https://junit.org/junit5/)
9394
- Spek: [spekframework.github.io](https://spekframework.github.io/)
9495
- Test::More: [metacpan.org/pod/Test::More](https://metacpan.org/pod/Test::More)
9596
- Test2::Suite: [metacpan.org/pod/Test2::Suite](https://metacpan.org/pod/Test2::Suite)

packages/core/js/data_formats/test-framework-convertor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1324,7 +1324,7 @@ function renderPest(model) {
13241324
rowData.join(',\n'),
13251325
'];',
13261326
'',
1327-
`it('${phpSingleQuoteLiteral(model.testNamePrefix)} parameterized', function (): void {`,
1327+
`it('${phpSingleQuoteLiteral(model.testNamePrefix)} parameterized', function () use ($rows): void {`,
13281328
' foreach ($rows as $row) {',
13291329
' $expected = $row;',
13301330
' $actual = mapRowUnderTest($row);',

tests/data_formats/test-framework-convertor-syntax.shared.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ function writeAndCheck({ framework, ext, checkCmd, checkArgsBuilder }) {
3838
const result = spawnSync(checkCmd, args, { encoding: 'utf-8' });
3939
fs.rmSync(tempDir, { recursive: true, force: true });
4040

41-
expect(result.status).toBe(
42-
0,
43-
`${framework} syntax check failed.\nSTDOUT:\n${result.stdout || ''}\nSTDERR:\n${result.stderr || ''}`
44-
);
41+
if (result.status !== 0) {
42+
throw new Error(
43+
`${framework} syntax check failed.\nSTDOUT:\n${result.stdout || ''}\nSTDERR:\n${result.stderr || ''}`
44+
);
45+
}
46+
expect(result.status).toBe(0);
4547
}
4648

4749
export { hasCommand, hasPerlModule, writeAndCheck };

0 commit comments

Comments
 (0)