gatsby
gatsby copied to clipboard
fix(gatsby-source-wordpress): get missing static file references for cached m…
…edia items
Description
Previously cached media items are collected but nothing is being done with the variable, which leads to missing static files when Gatsby is built.
Related Issues
Fixes #34899
You'll want to update the tests, currently it fails on this:
Error: expect(received).toHaveLength(expected)
Expected length: 2
Received length: 4
Received array: [{"localFile": {"id": 0}}, {"localFile": {"id": 1}}, {"localFile": {"id": 2}}, {"localFile": {"id": 3}}]
at Object.<anonymous> (/home/circleci/project/packages/gatsby-source-wordpress/__tests__/fetch-referenced-media-items.test.js:135:22)