mirror of
https://github.com/kremalicious/blowfish.git
synced 2024-11-22 01:36:58 +01:00
coverage fixes
This commit is contained in:
parent
46ab69905d
commit
cf6157b434
@ -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:
|
||||
|
@ -10,9 +10,25 @@ 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 needsConfig ? (
|
||||
<Welcome />
|
||||
) : error ? (
|
||||
<div className={styles.error}>{error}</div>
|
||||
) : isLoading ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
<>
|
||||
<Total />
|
||||
<Divider />
|
||||
<Accounts />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<main className={styles.main}>
|
||||
@ -22,22 +38,10 @@ export default function Home() {
|
||||
</a>
|
||||
</Link>
|
||||
|
||||
{needsConfig ? (
|
||||
<Welcome />
|
||||
) : error ? (
|
||||
<div className={styles.error}>{error}</div>
|
||||
) : isLoading ? (
|
||||
<Spinner />
|
||||
) : (
|
||||
<>
|
||||
<Total />
|
||||
<Divider />
|
||||
<Accounts />
|
||||
</>
|
||||
)}
|
||||
<MainContent />
|
||||
</main>
|
||||
|
||||
<Ticker style={isLoading ? { opacity: 0 } : null} />
|
||||
<Ticker />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
@ -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/**'
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user