Tweak test that calculates the transform cache key to be more consistent

Reviewed By: davidaurelio

Differential Revision: D6736754

fbshipit-source-id: 1a4c9dc1e5df0c7fa069148b87ed63caac949321
This commit is contained in:
Rafael Oleza 2018-01-17 08:06:37 -08:00 committed by Facebook Github Bot
parent e84f33bd9c
commit cfb6174c25
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`getTransformCacheKeyFn Should return always the same key for the same params 1`] = `"19a529ca8ec00ec50dbbf2de5278262868c1a04f32be6252a9bc5b8df65171914db10f84"`;
exports[`getTransformCacheKeyFn Should return always the same key for the same params 1`] = `"7b98b107d047d0c094f33c8c85d28a9c4edaf407"`;

View File

@ -22,7 +22,10 @@ describe('getTransformCacheKeyFn', () => {
getTransformCacheKeyFn({
cacheVersion: '1.0',
projectRoots: [__dirname],
transformModulePath: path.resolve(__dirname, '../../transformer.js'),
transformModulePath: path.resolve(
__dirname,
'../../defaultTransform.js',
),
})(),
).toMatchSnapshot();
});
@ -31,7 +34,7 @@ describe('getTransformCacheKeyFn', () => {
const baseParams = {
cacheVersion: '1.0',
projectRoots: [__dirname],
transformModulePath: path.resolve(__dirname, '../../transformer.js'),
transformModulePath: path.resolve(__dirname, '../../defaultTransform.js'),
};
const changedParams = [
@ -47,7 +50,7 @@ describe('getTransformCacheKeyFn', () => {
...baseParams,
transformModulePath: path.resolve(
__dirname,
'../../../src/defaultTransform.js',
'../../../src/transformer.js',
),
},
];