diff --git a/app/gabsocial/components/__tests__/__snapshots__/display_name-test.js.snap b/app/gabsocial/components/__tests__/__snapshots__/display_name-test.js.snap index 3f785b7c3..59789099f 100644 --- a/app/gabsocial/components/__tests__/__snapshots__/display_name-test.js.snap +++ b/app/gabsocial/components/__tests__/__snapshots__/display_name-test.js.snap @@ -18,6 +18,7 @@ exports[` renders display name + account name 1`] = ` className="display-name__account" > @ + bar@baz `; diff --git a/app/gabsocial/features/ui/components/__tests__/column-test.js b/app/gabsocial/features/ui/components/__tests__/column-test.js deleted file mode 100644 index 5c371fde5..000000000 --- a/app/gabsocial/features/ui/components/__tests__/column-test.js +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react'; -import { mount } from 'enzyme'; -import Column from '../column'; -import ColumnHeader from '../column_header'; - -describe('', () => { - describe(' click handler', () => { - const originalRaf = global.requestAnimationFrame; - - beforeEach(() => { - global.requestAnimationFrame = jest.fn(); - }); - - afterAll(() => { - global.requestAnimationFrame = originalRaf; - }); - - xit('runs the scroll animation if the column contains scrollable content', () => { - const wrapper = mount( - -
- - ); - wrapper.find(ColumnHeader).find('button').simulate('click'); - expect(global.requestAnimationFrame.mock.calls.length).toEqual(1); - }); - - xit('does not try to scroll if there is no scrollable content', () => { - const wrapper = mount(); - wrapper.find(ColumnHeader).find('button').simulate('click'); - expect(global.requestAnimationFrame.mock.calls.length).toEqual(0); - }); - }); -}); diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..30e0c58df --- /dev/null +++ b/jest.config.js @@ -0,0 +1,32 @@ +module.exports = { + 'projects': [ + '/app/gabsocial', + ], + 'testPathIgnorePatterns': [ + '/node_modules/', + '/vendor/', + '/config/', + '/log/', + '/public/', + '/tmp/', + '/webpack/', + ], + 'setupFiles': [ + 'raf/polyfill', + ], + 'setupFilesAfterEnv': [ + '/app/gabsocial/test_setup.js', + ], + 'collectCoverageFrom': [ + 'app/gabsocial/**/*.js', + '!app/gabsocial/features/emoji/emoji_compressed.js', + '!app/gabsocial/locales/locale-data/*.js', + '!app/gabsocial/service_worker/entry.js', + '!app/gabsocial/test_setup.js', + ], + 'coverageDirectory': '/coverage', + 'moduleDirectories': [ + '/node_modules', + '/app', + ], +};