@@ -123,6 +123,30 @@ it.layer(Layer.mergeAll(NodeServices.layer, NodeCrypto.layer))("ServerEnvironmen
123123 }
124124 } ) ,
125125 ) ;
126+ it . effect . each ( [
127+ { platform : "darwin" , architecture : "arm64" , supported : true } ,
128+ { platform : "linux" , architecture : "x64" , supported : true } ,
129+ { platform : "linux" , architecture : "x64" , libc : "musl" , supported : false } ,
130+ { platform : "win32" , architecture : "arm64" , supported : false } ,
131+ { platform : "linux" , architecture : "arm" , supported : false } ,
132+ ] as const ) ( "advertises voice transcription on $platform-$architecture: $supported" , ( host ) =>
133+ Effect . gen ( function * ( ) {
134+ const fileSystem = yield * FileSystem . FileSystem ;
135+ const baseDir = yield * fileSystem . makeTempDirectoryScoped ( {
136+ prefix : "t3-server-environment-speech-test-" ,
137+ } ) ;
138+ const descriptor = yield * Effect . gen ( function * ( ) {
139+ const serverEnvironment = yield * ServerEnvironment . ServerEnvironment ;
140+ return yield * serverEnvironment . getDescriptor ;
141+ } ) . pipe (
142+ Effect . provide ( layerServerEnvironment ( baseDir ) ) ,
143+ Effect . provideService ( HostProcess . Platform , host . platform ) ,
144+ Effect . provideService ( HostProcess . Architecture , host . architecture ) ,
145+ Effect . provideService ( HostProcess . LinuxLibc , "libc" in host ? host . libc : "gnu" ) ,
146+ ) ;
147+ expect ( descriptor . capabilities . voiceTranscription ) . toBe ( host . supported ) ;
148+ } ) ,
149+ ) ;
126150 it . effect . each ( [
127151 { name : "missing" , content : undefined } ,
128152 { name : "empty" , content : "" } ,
0 commit comments