Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(doc): write testing tips in README.md
Browse files Browse the repository at this point in the history
yujiosaka committed Apr 7, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 000a777 commit 9420fa4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -530,6 +530,22 @@ Also, the `args` option is passed to the browser instance. List of Chromium flag
HCCrawler.launch({ args: ['--disable-web-security'] });
```

### Running tests

All tests but RedisCache's are run by the following command.

```sh
yarn test
```

When you modify [RedisCache](https://github.com/yujiosaka/headless-chrome-crawler/blob/master/cache/redis.js)'s code, its tests are run by the following comannd:

```sh
yarn test-all
```

Make sure that [Redis](https://redis.io/) is installed and its server is started.

### Enable debug logging

All requests and browser's logs are logged via the [debug](https://github.com/visionmedia/debug) module under the `hccrawler` namespace.

0 comments on commit 9420fa4

Please sign in to comment.