docbrown/jest.config.js
Lisa Sy c627086d74
Update Connect responsiveness on smaller viewports (#8829) [deploy]
* Improve responsive experience for Connect

- Create single-screen experience for channels list & chat container on
  small screens
- Remove `expanded` and `contracted` functionality
- Make small UI updates to channels-list
- Update tests accordingly

https://github.com/thepracticaldev/dev.to/issues/8442

* Iterate per first review

- Delete unnecessary conditional for displaying side filters
- Improve width display
- Use different animation for responsive experience
- Add top-border stroke to composer input

* Update app/assets/stylesheets/chat.scss

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/assets/stylesheets/chat.scss

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/assets/stylesheets/chat.scss

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/assets/stylesheets/chat.scss

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/assets/stylesheets/chat.scss

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* Update app/assets/stylesheets/chat.scss

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>

* layout fix

* Update test to reflect markup updates

* Fix channels position issue

* Use constants

* Lower coverage threshold

* Update line coverage threshold

https://github.com/thepracticaldev/dev.to/pull/8829#issuecomment-650140589

Co-authored-by: ludwiczakpawel <ludwiczakpawel@gmail.com>
Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-29 09:08:18 -07:00

45 lines
1.5 KiB
JavaScript

// Consistent timezone for testing.
// This does not work on windows, see https://github.com/nodejs/node/issues/4230
/* global process, module */
process.env.TZ = 'UTC';
module.exports = {
setupFilesAfterEnv: ['./testSetup.js'],
collectCoverageFrom: [
'app/javascript/**/*.{js,jsx}',
// This exclusion avoids running coverage on Barrel files, https://twitter.com/housecor/status/981558704708472832
'!app/javascript/**/index.js',
'!app/javascript/packs/**/*.js', // avoids running coverage on webpacker pack files
'!**/__tests__/**',
'!**/__stories__/**',
'!app/javascript/storybook-static/**/*.js',
],
coverageThreshold: {
global: {
statements: 41,
branches: 35,
functions: 39,
lines: 41,
},
},
moduleNameMapper: {
'\\.(svg|png)$': '<rootDir>/empty-module.js',
'^@crayons(.*)$': '<rootDir>/app/javascript/crayons$1',
'^@utilities(.*)$': '<rootDir>/app/javascript/utilities$1',
},
// The webpack config folder for webpacker is excluded as it has a test.js file that gets
// picked up by jest if this folder is not excluded causing a false negative of a test suite failing.
testPathIgnorePatterns: [
'/node_modules/',
'./config/webpack',
// Allows developers to add utility modules that jest won't run as test suites.
'/__tests__/utilities/',
'./app/javascript/storybook-static',
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};