Fixed Jest warnings occurring after latest merge from upstream

This commit is contained in:
gianantoniopini
2021-06-02 15:02:36 +02:00
parent 99f87ebb3e
commit d71d378aa1

View File

@ -4,24 +4,18 @@ import { delay } from '../src/utils/index';
const Gatsby = jest.requireActual('gatsby'); const Gatsby = jest.requireActual('gatsby');
const fluidImageShapes = [ const imageData = {
{ images: {
aspectRatio: 2, fallback: {
src: 'test_image.jpg', src: `image_src.jpg`,
srcSet: 'some srcSet', srcSet: `image_src_set.jpg 1x`,
srcSetWebp: 'some srcSetWebp',
sizes: '(max-width: 600px) 100vw, 600px',
base64: 'string_of_base64',
}, },
{
aspectRatio: 3,
src: 'test_image_2.jpg',
srcSet: 'some other srcSet',
srcSetWebp: 'some other srcSetWebp',
sizes: '(max-width: 400px) 100vw, 400px',
base64: 'string_of_base64',
}, },
]; layout: `fixed`,
width: 1,
height: 2,
};
const childImageSharp = { gatsbyImageData: imageData };
const useStaticQuery = () => ({ const useStaticQuery = () => ({
site: { site: {
@ -33,39 +27,25 @@ const useStaticQuery = () => ({
}, },
}, },
file: { file: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[0],
},
}, },
onyx: { onyx: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[0],
},
}, },
pikachu: { pikachu: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[1],
},
}, },
gengar: { gengar: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[0],
},
}, },
castform: { castform: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[1],
},
}, },
glalie: { glalie: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[0],
},
}, },
celebi: { celebi: {
childImageSharp: { childImageSharp,
fluid: fluidImageShapes[1],
},
}, },
}); });