test: extend testRender to return spy on dispatch

This commit is contained in:
David Lechner
2022-03-10 02:00:14 -06:00
parent 41fc961661
commit b37209683b
5 changed files with 20 additions and 15 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ import Explorer from './Explorer';
describe('archive button', () => {
it('should be enabled if there are files', () => {
const explorer = testRender(<Explorer />, {
const [explorer] = testRender(<Explorer />, {
fileStorage: { fileNames: ['test.file'] },
});
@@ -16,7 +16,7 @@ describe('archive button', () => {
});
it('should be disabled if there are no files', () => {
const explorer = testRender(<Explorer />, {
const [explorer] = testRender(<Explorer />, {
fileStorage: { fileNames: [] },
});
@@ -26,7 +26,7 @@ describe('archive button', () => {
describe('list item', () => {
it('should show/hide buttons on hover', () => {
const explorer = testRender(<Explorer />, {
const [explorer] = testRender(<Explorer />, {
fileStorage: { fileNames: ['test.file'] },
});
@@ -45,7 +45,7 @@ describe('list item', () => {
});
it('should not focus buttons on click', () => {
const explorer = testRender(<Explorer />, {
const [explorer] = testRender(<Explorer />, {
fileStorage: { fileNames: ['test.file'] },
});