Skip to content

Commit 91116ac

Browse files
committed
Alter test descriptions to use string names
WebStorm won't recognize tests as runnable if `someFunc.name` is used as the `describe()` argument.
1 parent bc3d092 commit 91116ac

5 files changed

+5
-5
lines changed

test/hooks/useActions.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Provider as ProviderMock, useActions } from '../../src/index.js'
55

66
describe('React', () => {
77
describe('hooks', () => {
8-
describe(useActions.name, () => {
8+
describe('useActions', () => {
99
let store
1010
let dispatchedActions = []
1111

test/hooks/useDispatch.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const store = createStore(c => c + 1)
77

88
describe('React', () => {
99
describe('hooks', () => {
10-
describe(useDispatch.name, () => {
10+
describe('useDispatch', () => {
1111
afterEach(() => rtl.cleanup())
1212

1313
it("returns the store's dispatch function", () => {

test/hooks/useRedux.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Provider as ProviderMock, useRedux } from '../../src/index.js'
77

88
describe('React', () => {
99
describe('hooks', () => {
10-
describe(useRedux.name, () => {
10+
describe('useRedux', () => {
1111
let store
1212
let renderedItems = []
1313

test/hooks/useReduxContext.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useReduxContext } from '../../src/hooks/useReduxContext'
44

55
describe('React', () => {
66
describe('hooks', () => {
7-
describe(useReduxContext.name, () => {
7+
describe('useReduxContext', () => {
88
afterEach(() => rtl.cleanup())
99

1010
it('throws if component is not wrapped in provider', () => {

test/hooks/useSelector.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useReduxContext } from '../../src/hooks/useReduxContext'
88

99
describe('React', () => {
1010
describe('hooks', () => {
11-
describe(useSelector.name, () => {
11+
describe('useSelector', () => {
1212
let store
1313
let renderedItems = []
1414

0 commit comments

Comments
 (0)