1
0
mirror of https://github.com/kremalicious/blowfish.git synced 2024-11-22 09:47:00 +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:
- npm test || travis_terminate 1
- npm run dist
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- npm run dist
branches:
except:

View File

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

View File

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