test fixes

This commit is contained in:
Matthias Kretschmann 2019-06-26 12:53:50 +02:00
parent af6da53c58
commit c1cf01b834
Signed by: m
GPG Key ID: 606EEEF3C479A91F
7 changed files with 9 additions and 15 deletions

View File

@ -1,3 +1,4 @@
node_modules node_modules
build build
dist dist
coverage

View File

@ -25,8 +25,7 @@ before_install:
script: script:
# - ./scripts/install.sh # runs automatically with npm ci # - ./scripts/install.sh # runs automatically with npm ci
- $(npm bin)/cypress run --record - ./scripts/test.sh
#- ./scripts/test.sh
- ./scripts/coverage.sh - ./scripts/coverage.sh
- ./scripts/build.sh - ./scripts/build.sh

View File

@ -94,14 +94,14 @@ vi client/.env.local
Test suite is setup with [Jest](https://jestjs.io) and [react-testing-library](https://github.com/kentcdodds/react-testing-library) for unit testing, and [Cypress](https://www.cypress.io) for integration testing. Test suite is setup with [Jest](https://jestjs.io) and [react-testing-library](https://github.com/kentcdodds/react-testing-library) for unit testing, and [Cypress](https://www.cypress.io) for integration testing.
### Unit Tests To run all linting, unit and integration tests in one go, run:
To run all unit tests, including all linting tests:
```bash ```bash
npm test npm test
``` ```
### Unit Tests
For local development, you can start the test runners for client & server in a watch mode. For local development, you can start the test runners for client & server in a watch mode.
```bash ```bash

View File

@ -134,9 +134,7 @@ export default class VersionNumbers extends PureComponent<
return ( return (
<p className={styles.versionsMinimal}> <p className={styles.versionsMinimal}>
<a <a
title={`${squid.name} v${squid.version}\n${brizo.name} v${ title={`${squid.name} v${squid.version}\n${brizo.name} v${brizo.version}\n${aquarius.name} v${aquarius.version}`}
brizo.version
}\n${aquarius.name} v${aquarius.version}`}
href={'/about'} href={'/about'}
> >
v{commons.version} {squid.network && `(${squid.network})`} v{commons.version} {squid.network && `(${squid.network})`}

View File

@ -16,9 +16,7 @@ const Footer = () => (
<Market.Consumer> <Market.Consumer>
{state => {state =>
state.totalAssets > 0 && state.totalAssets > 0 &&
` With a total of ${ ` With a total of ${state.totalAssets} registered assets.`
state.totalAssets
} registered assets.`
} }
</Market.Consumer> </Market.Consumer>
</p> </p>

View File

@ -34,9 +34,7 @@ export default class AssetDetails extends PureComponent<AssetDetailsProps> {
</h2> </h2>
<div className={styles.metaPrimaryData}> <div className={styles.metaPrimaryData}>
<span <span
title={`Date created, published on ${ title={`Date created, published on ${base.datePublished}`}
base.datePublished
}`}
> >
<Moment <Moment
date={base.dateCreated} date={base.dateCreated}

View File

@ -21,7 +21,7 @@
"lint": "npm run lint:js && npm run lint:css", "lint": "npm run lint:js && npm run lint:css",
"release": "release-it --non-interactive", "release": "release-it --non-interactive",
"changelog": "auto-changelog -p", "changelog": "auto-changelog -p",
"cypress:run": "cypress run", "cypress:run": "$(npm bin)/cypress run",
"cypress:open": "cypress open" "cypress:open": "cypress open"
}, },
"dependencies": { "dependencies": {