Skip to content

Fix Image field tests#8820

Closed
dcousens wants to merge 2 commits into
mainfrom
fix-image-tests
Closed

Fix Image field tests#8820
dcousens wants to merge 2 commits into
mainfrom
fix-image-tests

Conversation

@dcousens
Copy link
Copy Markdown
Member

@dcousens dcousens commented Sep 20, 2023

These tests were disabled in #8304 as jest was exploding with a Segmentation Fault, this should help resolve that.

@dcousens dcousens requested a review from borisno2 September 20, 2023 07:26
@dcousens dcousens self-assigned this Sep 20, 2023
@dcousens dcousens changed the title Fix image field tests Fix Image field tests Sep 20, 2023
@dcousens dcousens closed this Sep 20, 2023
@dcousens dcousens reopened this Sep 20, 2023
@dcousens dcousens closed this Sep 20, 2023
@dcousens dcousens deleted the fix-image-tests branch September 20, 2023 07:41
@dcousens dcousens restored the fix-image-tests branch September 20, 2023 23:23
@dcousens dcousens reopened this Sep 20, 2023
import { v4 as uuid } from 'uuid';
import { randomBytes } from 'crypto';

import { fileTypeFromBuffer } from 'file-type';
Copy link
Copy Markdown
Member Author

@dcousens dcousens Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file-type is ESM, which is problematic

jest is now passing, but we need the Keystone usage of esbuild to work too

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vercel/remix e.g. read the package.json of the project to check if "type": "module" is set. I guess we can read that and tell the esbuild pipeline to either export the .keystone/config.js in CJS or ESM style? 🤔

Comment thread package.json
]
}
},
"transformIgnorePatterns": []
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably isn't the best pathway for this

@codesandbox-ci
Copy link
Copy Markdown

codesandbox-ci Bot commented Sep 25, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 789bbc3:

Sandbox Source
@keystone-6/sandbox Configuration

@emmatown
Copy link
Copy Markdown
Member

Solved in #9529

@emmatown emmatown closed this Mar 18, 2025
@emmatown emmatown deleted the fix-image-tests branch March 18, 2025 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants