1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-11-22 17:50:11 +01:00

coverage fixes

This commit is contained in:
Matthias Kretschmann 2020-02-25 16:57:39 +01:00
parent 46ab69905d
commit cf6157b434
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 25 additions and 21 deletions

View File

@ -22,10 +22,8 @@ before_script:
script: script:
- npm test || travis_terminate 1 - npm test || travis_terminate 1
- npm run dist
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- npm run dist
branches: branches:
except: except:

View File

@ -10,19 +10,10 @@ import Accounts from '../components/Home/Accounts'
import IconCog from '../images/cog.svg' import IconCog from '../images/cog.svg'
import styles from './index.module.css' import styles from './index.module.css'
export default function Home() { function MainContent() {
const { isLoading, error, needsConfig } = useContext(AppContext) const { isLoading, error, needsConfig } = useContext(AppContext)
return ( return needsConfig ? (
<>
<main className={styles.main}>
<Link href="/preferences">
<a className={styles.preferences}>
<IconCog />
</a>
</Link>
{needsConfig ? (
<Welcome /> <Welcome />
) : error ? ( ) : error ? (
<div className={styles.error}>{error}</div> <div className={styles.error}>{error}</div>
@ -34,10 +25,23 @@ export default function Home() {
<Divider /> <Divider />
<Accounts /> <Accounts />
</> </>
)} )
}
export default function Home() {
return (
<>
<main className={styles.main}>
<Link href="/preferences">
<a className={styles.preferences}>
<IconCog />
</a>
</Link>
<MainContent />
</main> </main>
<Ticker style={isLoading ? { opacity: 0 } : null} /> <Ticker />
</> </>
) )
} }

View File

@ -22,11 +22,13 @@ module.exports = {
setupFilesAfterEnv: ['<rootDir>/tests/setupTests.js'], setupFilesAfterEnv: ['<rootDir>/tests/setupTests.js'],
runner: '@jest-runner/electron', runner: '@jest-runner/electron',
testEnvironment: '@jest-runner/electron/environment', testEnvironment: '@jest-runner/electron/environment',
coverageDirectory: '../../coverage/', coverageDirectory: '<rootDir>/coverage/',
collectCoverage: true, collectCoverage: true,
collectCoverageFrom: [ collectCoverageFrom: [
'<rootDir>/src/renderer/**/*.jsx', '<rootDir>/src/renderer/**/*.{js,jsx}',
'!<rootDir>/dist', '!<rootDir>/src/renderer/next.config.js',
'!<rootDir>/src/renderer/out/**/*',
'!<rootDir>/src/renderer/.next/**/*',
'!**/node_modules/**' '!**/node_modules/**'
] ]
} }