Skip to content

Commit 2d915cd

Browse files
committed
test: it should not ignore lru-cache by default
Signed-off-by: DevDengChao <2325690622@qq.com>
1 parent 2311e9e commit 2d915cd

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

test/lib/ignore.test.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff 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
});

0 commit comments

Comments
 (0)