Skip to content

Commit

Permalink
Move tests into separate directory
Browse files Browse the repository at this point in the history
  • Loading branch information
wpj committed Sep 11, 2020
1 parent f827101 commit 473640d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
testMatch: ['**/*.test.(js|jsx|ts|tsx)'],
testMatch: ['**/tests/*.(js|jsx|ts|tsx)'],
};
4 changes: 2 additions & 2 deletions src/react-peekaboo.test.tsx → tests/react-peekaboo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jest.mock('dom-peekaboo', () => {

import { peekaboo, ChangeHandler } from 'dom-peekaboo';

import { useIntersecting, useIntersectionChange } from '.';
import { useIntersecting, useIntersectionChange } from '../src';

const mockedPeekaboo = peekaboo as jest.Mock;

Expand All @@ -32,7 +32,7 @@ function UseIntersectionChangeTest({ enabled = true }: { enabled?: boolean }) {
enabled,
});

let statusText;
let statusText: string;

if (isIntersecting === null) {
statusText = 'not initialized';
Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"noUnusedParameters": true,
"pretty": true,
"removeComments": true,
"rootDir": "src",
"strict": true,
"strictNullChecks": true,
"stripInternal": true,
Expand All @@ -37,7 +36,5 @@
],
"exclude": [
"node_modules",
"pages",
"test"
]
}

0 comments on commit 473640d

Please sign in to comment.