@@ -13,46 +13,6 @@ beforeEach(() => {
1313} )
1414
1515describe ( 'devupUILoader' , ( ) => {
16- it ( 'should ignore lib files' , ( ) => {
17- const t = {
18- getOptions : ( ) => ( {
19- package : 'package' ,
20- cssFile : 'cssFile' ,
21- watch : false ,
22- } ) ,
23- addDependency : vi . fn ( ) ,
24- async : vi . fn ( ) . mockReturnValue ( vi . fn ( ) ) ,
25- resourcePath : 'node_modules/package/index.ts' ,
26- }
27- devupUILoader . bind ( t as any ) (
28- Buffer . from ( 'code' ) ,
29- 'node_modules/package/index.ts' ,
30- )
31-
32- expect ( t . async ) . toHaveBeenCalled ( )
33- expect ( t . async ( ) ) . toHaveBeenCalledWith ( null , Buffer . from ( 'code' ) )
34- } )
35-
36- it ( 'should ignore wrong files' , ( ) => {
37- const t = {
38- getOptions : ( ) => ( {
39- package : 'package' ,
40- cssFile : 'cssFile' ,
41- watch : false ,
42- } ) ,
43- async : vi . fn ( ) . mockReturnValue ( vi . fn ( ) ) ,
44- resourcePath : 'node_modules/package/index.css' ,
45- addDependency : vi . fn ( ) ,
46- }
47- devupUILoader . bind ( t as any ) (
48- Buffer . from ( 'code' ) ,
49- 'node_modules/package/index.css' ,
50- )
51-
52- expect ( t . async ) . toHaveBeenCalled ( )
53- expect ( t . async ( ) ) . toHaveBeenCalledWith ( null , Buffer . from ( 'code' ) )
54- } )
55-
5616 it ( 'should extract code with css' , async ( ) => {
5717 const _compiler = {
5818 __DEVUP_CACHE : '' ,
0 commit comments