Skip to content

Commit

Permalink
Alter test descriptions to use string names
Browse files Browse the repository at this point in the history
WebStorm won't recognize tests as runnable if `someFunc.name` is
used as the `describe()` argument.
  • Loading branch information
markerikson committed Apr 22, 2019
1 parent bc3d092 commit 91116ac
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/hooks/useActions.spec.js
Expand Up @@ -5,7 +5,7 @@ import { Provider as ProviderMock, useActions } from '../../src/index.js'

describe('React', () => {
describe('hooks', () => {
describe(useActions.name, () => {
describe('useActions', () => {
let store
let dispatchedActions = []

Expand Down
2 changes: 1 addition & 1 deletion test/hooks/useDispatch.spec.js
Expand Up @@ -7,7 +7,7 @@ const store = createStore(c => c + 1)

describe('React', () => {
describe('hooks', () => {
describe(useDispatch.name, () => {
describe('useDispatch', () => {
afterEach(() => rtl.cleanup())

it("returns the store's dispatch function", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/hooks/useRedux.spec.js
Expand Up @@ -7,7 +7,7 @@ import { Provider as ProviderMock, useRedux } from '../../src/index.js'

describe('React', () => {
describe('hooks', () => {
describe(useRedux.name, () => {
describe('useRedux', () => {
let store
let renderedItems = []

Expand Down
2 changes: 1 addition & 1 deletion test/hooks/useReduxContext.spec.js
Expand Up @@ -4,7 +4,7 @@ import { useReduxContext } from '../../src/hooks/useReduxContext'

describe('React', () => {
describe('hooks', () => {
describe(useReduxContext.name, () => {
describe('useReduxContext', () => {
afterEach(() => rtl.cleanup())

it('throws if component is not wrapped in provider', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/hooks/useSelector.spec.js
Expand Up @@ -8,7 +8,7 @@ import { useReduxContext } from '../../src/hooks/useReduxContext'

describe('React', () => {
describe('hooks', () => {
describe(useSelector.name, () => {
describe('useSelector', () => {
let store
let renderedItems = []

Expand Down

0 comments on commit 91116ac

Please sign in to comment.