Skip to content

Commit

Permalink
add missing import to test
Browse files Browse the repository at this point in the history
  • Loading branch information
schehata committed Jan 26, 2023
1 parent 181dc72 commit 467323a
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions __tests__/withAxiom.test.ts
@@ -1,5 +1,5 @@
import { Logger, withAxiom } from '../src/index';
import { withAxiomNextServerSidePropsHandler } from '../src/withAxiom';
import { withAxiomGetServerSideProps, withAxiomNextServerSidePropsHandler } from '../src/withAxiom';
import { GetServerSideProps, GetServerSidePropsContext, NextApiRequest, NextApiResponse } from 'next';
import 'whatwg-fetch';
import { NextFetchEvent, NextRequest, NextResponse } from 'next/server';
Expand Down Expand Up @@ -57,14 +57,13 @@ test('withAxiom(NextConfig) with fallback rewrites (regression test for #21)', a
if (config.rewrites) await config.rewrites();
});


test('withAxiom(GetServerSideProps)', async () => {
const getServerSideProps: GetServerSideProps = async (context: GetServerSidePropsContext) => {
return {
props: {},
};
};
const handler = withAxiomGetServerSideProps(getServerSideProps);
expect(handler).toBeInstanceOf(Function);
// TODO: Make sure we have a AxiomGetServerSideProps
});
test('withAxiom(GetServerSideProps)', async () => {
const getServerSideProps: GetServerSideProps = async (context: GetServerSidePropsContext) => {
return {
props: {},
};
};
const handler = withAxiomGetServerSideProps(getServerSideProps);
expect(handler).toBeInstanceOf(Function);
// TODO: Make sure we have a AxiomGetServerSideProps
});

0 comments on commit 467323a

Please sign in to comment.