Fix test for RN asset

Reviewed By: cpojer, rafeca

Differential Revision: D5777553

fbshipit-source-id: 3bc8559076435c6254972552095967b88acb0576
This commit is contained in:
Miguel Jimenez Esun 2017-09-07 01:39:05 -07:00 committed by Facebook Github Bot
parent 165f876730
commit 33bbfb7125
2 changed files with 3 additions and 3 deletions

View File

@ -5,14 +5,14 @@ exports[`renders assets based on relative path 1`] = `
<Image
source={
Object {
"testUri": "Libraries/Image/__tests__/img/img1.png",
"testUri": "../Libraries/Image/__tests__/img/img1.png",
}
}
/>
<Image
source={
Object {
"testUri": "Libraries/Image/__tests__/img/img2.png",
"testUri": "../Libraries/Image/__tests__/img/img2.png",
}
}
/>

View File

@ -20,7 +20,7 @@ module.exports = {
// the Jest snapshot.
process: (_, filename) =>
`module.exports = {
testUri: ${JSON.stringify(path.relative('.', filename))}
testUri: ${JSON.stringify(path.relative(__dirname, filename))}
};`,
getCacheKey: createCacheKeyFunction([__filename]),
};