Open phoenix741 opened 5 months ago
My modification will break this TU:
test('enables caching', t => {
const instance = createTestInstance({
serverless: {
service: { custom: { includeDependencies: { enableCaching: true } } }
}
});
const cacheEnabled = instance.cacheEnabled;
t.true(cacheEnabled);
const file = path.join(__dirname, 'fixtures', 'thing.js');
const list1 = instance.getDependencies(file, [], cacheEnabled);
const list2 = instance.getDependencies(file, [], cacheEnabled);
console.log(list1);
console.log(list2);
t.true(list2.length < list1.length);
});
I'm not sur why because we read two time the same file, and the test thing to have two different result, but with the global cache, i have always the same result.
I propose this PR to fix #98.
There is two modification :