1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

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
build
dist
coverage

View File

@ -25,8 +25,7 @@ before_install:
script:
# - ./scripts/install.sh # runs automatically with npm ci
- $(npm bin)/cypress run --record
#- ./scripts/test.sh
- ./scripts/test.sh
- ./scripts/coverage.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.
### Unit Tests
To run all unit tests, including all linting tests:
To run all linting, unit and integration tests in one go, run:
```bash
npm test
```
### Unit Tests
For local development, you can start the test runners for client & server in a watch mode.
```bash

View File

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

View File

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

View File

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

View File

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