From d8743ec94ee3ebd3fab73188fa0eb71e9777eb88 Mon Sep 17 00:00:00 2001 From: erik_ritter Date: Thu, 2 Dec 2021 21:25:20 -0800 Subject: [PATCH] Add Provider test and cleanup jest configs --- packages/hooks/jest.config.js | 22 ---------------------- packages/hooks/src/Provider.test.tsx | 11 +++++++++++ 2 files changed, 11 insertions(+), 22 deletions(-) delete mode 100644 packages/hooks/jest.config.js create mode 100644 packages/hooks/src/Provider.test.tsx diff --git a/packages/hooks/jest.config.js b/packages/hooks/jest.config.js deleted file mode 100644 index 43519113..00000000 --- a/packages/hooks/jest.config.js +++ /dev/null @@ -1,22 +0,0 @@ -module.exports = { - preset: 'ts-jest/presets/js-with-ts', - testMatch: [ - '/src/**/__tests__/**/*.{js,jsx,ts,tsx}', - '/src/**/?(*.)(spec|test).{js,jsx,ts,tsx}', - ], - coveragePathIgnorePatterns: [ - '/node_modules/', - 'dist/', - '/src/index.ts', - '/src/components/index.ts', - ], - collectCoverageFrom: ['/src/**/*.{js,ts,tsx,jsx}'], - coverageThreshold: { - global: { - branches: 90, - functions: 90, - lines: 90, - statements: 90, - }, - }, -}; diff --git a/packages/hooks/src/Provider.test.tsx b/packages/hooks/src/Provider.test.tsx new file mode 100644 index 00000000..b7e7d74b --- /dev/null +++ b/packages/hooks/src/Provider.test.tsx @@ -0,0 +1,11 @@ +import React from 'react'; +import { render } from '@testing-library/react'; + +import { Provider } from './Provider'; + +describe('Provider', () => { + it('renders without throwing', () => { + const { container } = render(); + expect(container).toBeInTheDocument(); + }); +});