@@ -32,58 +32,5 @@ describeLibraryBuilder(executeLibraryBuilder, LIBRARY_BUILDER_INFO, (harness) =>
3232 harness . expectFile ( 'dist/custom-output/fesm2022/lib.mjs' ) . toExist ( ) ;
3333 harness . expectFile ( 'dist/custom-output/package.json' ) . toExist ( ) ;
3434 } ) ;
35-
36- it ( 'should reject outputPath equal to projectRoot' , async ( ) => {
37- harness . useTarget ( 'build' , {
38- ...BASE_OPTIONS ,
39- outputPath : 'projects/lib' ,
40- } ) ;
41-
42- const { result, error } = await harness . executeOnce ( {
43- outputLogsOnException : false ,
44- outputLogsOnFailure : false ,
45- } ) ;
46- expect ( result ) . toBeUndefined ( ) ;
47- expect ( error ) . toBeDefined ( ) ;
48- expect ( ( error as Error ) . message ) . toMatch (
49- / T h e ' o u t p u t P a t h ' o p t i o n .* c a n n o t b e t h e w o r k s p a c e r o o t , p r o j e c t r o o t , o r a p a r e n t d i r e c t o r y o f t h e p r o j e c t r o o t / ,
50- ) ;
51- harness . expectFile ( 'projects/lib/package.json' ) . toExist ( ) ;
52- } ) ;
53-
54- it ( 'should reject outputPath equal to workspaceRoot' , async ( ) => {
55- harness . useTarget ( 'build' , {
56- ...BASE_OPTIONS ,
57- outputPath : '.' ,
58- } ) ;
59-
60- const { result, error } = await harness . executeOnce ( {
61- outputLogsOnException : false ,
62- outputLogsOnFailure : false ,
63- } ) ;
64- expect ( result ) . toBeUndefined ( ) ;
65- expect ( error ) . toBeDefined ( ) ;
66- expect ( ( error as Error ) . message ) . toMatch (
67- / T h e ' o u t p u t P a t h ' o p t i o n .* c a n n o t b e t h e w o r k s p a c e r o o t , p r o j e c t r o o t , o r a p a r e n t d i r e c t o r y o f t h e p r o j e c t r o o t / ,
68- ) ;
69- } ) ;
70-
71- it ( 'should reject outputPath when it is a parent directory of projectRoot' , async ( ) => {
72- harness . useTarget ( 'build' , {
73- ...BASE_OPTIONS ,
74- outputPath : 'projects' ,
75- } ) ;
76-
77- const { result, error } = await harness . executeOnce ( {
78- outputLogsOnException : false ,
79- outputLogsOnFailure : false ,
80- } ) ;
81- expect ( result ) . toBeUndefined ( ) ;
82- expect ( error ) . toBeDefined ( ) ;
83- expect ( ( error as Error ) . message ) . toMatch (
84- / T h e ' o u t p u t P a t h ' o p t i o n .* c a n n o t b e t h e w o r k s p a c e r o o t , p r o j e c t r o o t , o r a p a r e n t d i r e c t o r y o f t h e p r o j e c t r o o t / ,
85- ) ;
86- harness . expectFile ( 'projects/lib/package.json' ) . toExist ( ) ;
87- } ) ;
8835 } ) ;
8936} ) ;
0 commit comments