File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,4 +28,22 @@ describe('isIgnoredInCodeUri should works', function () {
2828 let isIgnored : IsIgnored = await isIgnoredInCodeUri ( workspace , 'custom' ) ;
2929 expect ( isIgnored ( file ) ) . toBeTruthy ( ) ;
3030 } ) ;
31+
32+ /**
33+ * [s deploy Nuxt3 应用导致线上服务端缺少 lru-cache 包](https://github.com/Serverless-Devs/Serverless-Devs/issues/701)
34+ */
35+ test ( 'it should not ignore lru-cache by default' , async function ( ) {
36+ // no custom .fcignore rules
37+ // let pattern = '';
38+ // fs.writeFileSync(dotFcIgnore, pattern);
39+
40+ let lruCacheDir = `${ workspace } /.output/server/node_modules/lru-cache` ;
41+ fs . mkdirSync ( lruCacheDir , { recursive : true } ) ;
42+
43+ let file = path . join ( lruCacheDir , 'index.js' ) ;
44+ fs . writeFileSync ( file , '' ) ;
45+
46+ let isIgnored : IsIgnored = await isIgnoredInCodeUri ( workspace , 'custom' ) ;
47+ expect ( isIgnored ( file ) ) . toBeFalsy ( ) ;
48+ } ) ;
3149} ) ;
You can’t perform that action at this time.
0 commit comments