Skip to content

Commit 95b6d32

Browse files
authored
TINY-14063: Await test compilation (#166)
* TINY-14037: Compile before reaching end-point * TINY-14063: Changelog
1 parent 3b37e69 commit 95b6d32

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## Unreleased
8+
9+
### Fixed
10+
- `bedrock-auto` now awaits test compilation. #TINY-14037
11+
712
## 16.1.1 - 2026-03-12
813

914
### Fixed

modules/server/src/main/ts/bedrock/server/RunnerRoutes.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ export const generate = async (mode: string, projectdir: string, basedir: string
8787

8888
const resourceRoutes = resourceRoots.map(({name, folder}) => Routes.routing('GET', `/project/${name}`, path.join(projectdir, folder)));
8989

90+
const compiledTests = mode === 'auto' ? Promise.resolve(await testGenerator.generate()) : testGenerator.generate();
91+
9092
const routers = [
9193
...nodeModuleRoutes,
9294
...resourceRoutes,
@@ -104,7 +106,7 @@ export const generate = async (mode: string, projectdir: string, basedir: string
104106
Routes.nodeResolveFile('GET', '/agar-sw.js', projectdir, '@ephox/agar-sw', 'dist/agar-sw.js'),
105107

106108
// test code
107-
Routes.asyncJs('GET', '/compiled/tests.js', testGenerator.generate()),
109+
Routes.asyncJs('GET', '/compiled/tests.js', compiledTests),
108110
Routes.routing('GET', '/compiled', path.join(projectdir, scratchdir, 'compiled')),
109111

110112
// harness API

0 commit comments

Comments
 (0)