Skip to content

Commit

Permalink
Merge pull request #32 from meza/camelize-import
Browse files Browse the repository at this point in the history
fix: fix camelize-ts import
  • Loading branch information
meza authored Apr 6, 2023
2 parents 416a25d + b063d58 commit 58469da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/lib/transformUserData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ describe('transformUserData', () => {

const actual = transformUserData(input);

expect(actual).toEqual(expected);
expect(actual).resolves.toEqual(expected);
});
});
7 changes: 4 additions & 3 deletions src/lib/transformUserData.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import camelize from 'camelize-ts';
import type { Auth0UserProfile, UserProfile } from '../Auth0RemixTypes.js';

export const transformUserData = (data: Auth0UserProfile) =>
camelize(data) satisfies UserProfile;
export const transformUserData = async (data: Auth0UserProfile) => {
const camelize = (await import('camelize-ts')).default;
return camelize(data) satisfies UserProfile;
};

0 comments on commit 58469da

Please sign in to comment.