-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added capslock and updated keyCode to key
- Loading branch information
1 parent
26c9bfc
commit 2182d63
Showing
10 changed files
with
7,512 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
"presets": ["@babel/preset-env", "@babel/preset-react"], | ||
"ignore": ["*/__tests__.js", "*.test.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const ignores = [ | ||
'/node_modules/', | ||
'/__fixtures__/', | ||
'/fixtures/', | ||
'/__tests__/helpers/', | ||
'/__tests__/utils/', | ||
'__mocks__' | ||
]; | ||
|
||
module.exports = { | ||
testMatch: ['**/__tests__/**/*.+(js|jsx|ts|tsx)'], | ||
testPathIgnorePatterns: [...ignores] | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { cleanup } from '@testing-library/react'; | ||
import { setUpHook } from '../testUtils'; | ||
|
||
describe('useKeyCapture', () => { | ||
afterEach(cleanup()); | ||
|
||
it('should have some result', () => { | ||
const hook = setUpHook(); | ||
console.log('hook', hook); | ||
expect(2).toBe(3); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { renderHook } from '@testing-library/react-hooks'; | ||
import useKeyCapture from './index'; | ||
|
||
// export const setUpHook = renderHook(useKeyCapture()); | ||
export const setUpHook = 'hi'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.