Skip to content

Commit

Permalink
docs: add TODO comment about improving test
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Jul 19, 2024
1 parent 732b37b commit 5711f84
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ describe('browserCompatibleSanityPackageSpecifiers', () => {
})

describe('getAliases', () => {
// TODO: this test would be better if it called `vite.build` with fixtures
// but vite does not seem to be compatible in our jest environment.
// Error from trying to import vite:
//
// > Invariant violation: "new TextEncoder().encode("") instanceof Uint8Array" is incorrectly false
// >
// > This indicates that your JavaScript environment is broken. You cannot use
// > esbuild in this environment because esbuild relies on this invariant. This
// > is not a problem with esbuild. You need to fix your environment instead.
it('returns the correct aliases for normal builds', () => {
const aliases = getAliases({
sanityPkgPath,
Expand Down

0 comments on commit 5711f84

Please sign in to comment.