Fix test for RN asset
Reviewed By: cpojer, rafeca Differential Revision: D5777553 fbshipit-source-id: 3bc8559076435c6254972552095967b88acb0576
This commit is contained in:
parent
165f876730
commit
33bbfb7125
|
@ -5,14 +5,14 @@ exports[`renders assets based on relative path 1`] = `
|
||||||
<Image
|
<Image
|
||||||
source={
|
source={
|
||||||
Object {
|
Object {
|
||||||
"testUri": "Libraries/Image/__tests__/img/img1.png",
|
"testUri": "../Libraries/Image/__tests__/img/img1.png",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Image
|
<Image
|
||||||
source={
|
source={
|
||||||
Object {
|
Object {
|
||||||
"testUri": "Libraries/Image/__tests__/img/img2.png",
|
"testUri": "../Libraries/Image/__tests__/img/img2.png",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -20,7 +20,7 @@ module.exports = {
|
||||||
// the Jest snapshot.
|
// the Jest snapshot.
|
||||||
process: (_, filename) =>
|
process: (_, filename) =>
|
||||||
`module.exports = {
|
`module.exports = {
|
||||||
testUri: ${JSON.stringify(path.relative('.', filename))}
|
testUri: ${JSON.stringify(path.relative(__dirname, filename))}
|
||||||
};`,
|
};`,
|
||||||
getCacheKey: createCacheKeyFunction([__filename]),
|
getCacheKey: createCacheKeyFunction([__filename]),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue