Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Test exports with esnext
Browse files Browse the repository at this point in the history
  • Loading branch information
Heather Frantisak committed Jan 31, 2022
1 parent 5dc4853 commit 97b72f4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/consistent-package-json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ packages.forEach(
it('specifies the expected types', () => {
expect(packageJSON.types).toBe(expectedPackageJSON.types);
});

it('specifies the expected exports', () => {
expect(packageJSON.exports).toStrictEqual(
expect.objectContaining(expectedPackageJSON.exports),
);
});

it('specifies esnext as the first expected export', () => {
expect(packageJSON.exports['.'].esnext).toBe(
expectedPackageJSON.exports['.'].esnext,
);
});
}
});

Expand Down

0 comments on commit 97b72f4

Please sign in to comment.