@@ -8,8 +8,14 @@ function createDeps(overrides = {}) {
88 throw new Error ( 'spawn should not be called in createBuild tests' ) ;
99 } ,
1010 createApiClient : ( ) => ( { } ) ,
11- createApiBuild : async ( ) => ( { id : 'api-build-123' } ) ,
12- getBuild : async ( ) => ( { id : 'api-build-123' } ) ,
11+ createApiBuild : async ( ) => ( {
12+ id : 'api-build-123' ,
13+ url : 'https://app.vizzly.dev/org/project/builds/api-build-123' ,
14+ } ) ,
15+ getBuild : async ( ) => ( {
16+ id : 'api-build-123' ,
17+ url : 'https://app.vizzly.dev/org/project/builds/api-build-123' ,
18+ } ) ,
1319 finalizeApiBuild : async ( ) => { } ,
1420 output : {
1521 debug : ( ) => { } ,
@@ -42,6 +48,10 @@ describe('services/test-runner', () => {
4248 { } ,
4349 { deps }
4450 ) ;
51+ let buildEvents = [ ] ;
52+ testRunner . on ( 'build-created' , event => {
53+ buildEvents . push ( event ) ;
54+ } ) ;
4555
4656 let buildId = await testRunner . createBuild (
4757 {
@@ -54,6 +64,12 @@ describe('services/test-runner', () => {
5464 ) ;
5565
5666 assert . strictEqual ( buildId , 'api-build-123' ) ;
67+ assert . deepStrictEqual ( buildEvents , [
68+ {
69+ buildId : 'api-build-123' ,
70+ url : 'https://app.vizzly.dev/org/project/builds/api-build-123' ,
71+ } ,
72+ ] ) ;
5773 assert . deepStrictEqual ( writtenSessions , [
5874 {
5975 buildId : 'api-build-123' ,
0 commit comments