Skip to content

Commit 57d4fc5

Browse files
author
Emmanouil Konstantinidis
committed
Mock window.require
1 parent 1f07d98 commit 57d4fc5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/js/__tests__/components/footer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,17 @@ describe('Test for Footer', function () {
1212
var Actions, Footer;
1313

1414
beforeEach(function () {
15+
// Mock Electron's window.require
16+
window.require = jest.genMockFunction();
17+
1518
Actions = require('../../actions/actions.js');
1619
Footer = require('../../components/footer.js');
1720
});
1821

1922
it('Should load the footer', function () {
2023

2124
var instance = TestUtils.renderIntoDocument(<Footer />);
22-
23-
console.log(instance);
25+
expect(instance.openRepoBrowser).toBeDefined();
2426

2527
});
2628

0 commit comments

Comments
 (0)