File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
wa-sqlite-driver/src/worker_threads Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,16 @@ export function describeDriverTests(
2121 } ;
2222
2323 beforeEach ( ( context ) => {
24- const testNameSanitized = context . fullName . replaceAll (
24+ let testNameSanitized = context . fullName . replaceAll (
2525 / [ \s \/ \\ > \. \- \: ] + / g,
2626 '_'
2727 ) ;
28+
29+ if ( testNameSanitized . length > 10 ) {
30+ testNameSanitized =
31+ testNameSanitized . substring ( testNameSanitized . length - 7 ) +
32+ String ( Math . random ( ) ) . substring ( 1 , 4 ) ;
33+ }
2834 dbPath = `test-db/${ testNameSanitized } .db` ;
2935 } ) ;
3036
Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ export function setupDriverPort(config: WorkerDriverConfig) {
4141 open . resolve ( ) ;
4242 } catch ( e : any ) {
4343 open . reject ( e ) ;
44- port . postMessage ( { id, value : { error : { message : e . message } } } ) ;
44+ port . postMessage ( {
45+ id,
46+ value : { error : { message : e . message , code : e . code } }
47+ } ) ;
4548 }
4649 } else if ( message == 'close' ) {
4750 try {
You can’t perform that action at this time.
0 commit comments