File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
integration-tests/worker/test Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,30 @@ test('crash: syntax error', async (t) => {
5353 t . regex ( error_message , / U n e x p e c t e d t o k e n \( 1 : 9 \) $ / ) ;
5454} ) ;
5555
56+ // https://github.com/OpenFn/kit/issues/1045
57+ test ( 'crash: reference error' , async ( t ) => {
58+ const attempt = {
59+ id : crypto . randomUUID ( ) ,
60+ jobs : [
61+ {
62+ name : 'x' , // important!
63+ adaptor : '@openfn/language-common@latest' ,
64+ body : 'fn((s) => s.err.map(s => s))' ,
65+ } ,
66+ ] ,
67+ } ;
68+
69+ const result = await run ( attempt ) ;
70+
71+ const { reason, error_type, error_message } = result ;
72+ t . is ( reason , 'fail' ) ;
73+ t . is ( error_type , 'RuntimeError' ) ;
74+ t . regex (
75+ error_message ,
76+ / T y p e E r r o r : C a n n o t r e a d p r o p e r t i e s o f u n d e f i n e d \( r e a d i n g \' m a p \' \) /
77+ ) ;
78+ } ) ;
79+
5680// https://github.com/OpenFn/kit/issues/758
5781test ( 'crash: job not found' , async ( t ) => {
5882 lightning . addDataclip ( 'x' , { } ) ;
You can’t perform that action at this time.
0 commit comments