From 7f9492ba07238c9c1aa3a5d44aef7bac0362b578 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Tue, 28 Feb 2017 19:28:28 -0500 Subject: [PATCH] ci(nyc): test coverage using only the Node implementation, document reasoning --- README.md | 4 +++- package.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 022afd7..b65cd49 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,9 @@ yarn run info ### Browser libraries -This starter currently does **not** run tests in a browser ([AVA](https://github.com/avajs/ava) tests in Node exclusively). While the current testing system will be sufficient for most use cases, some projects will (also) need to implement a browser-based testing system like [karma-ava](https://github.com/avajs/karma-ava). (Pull requests welcome!) +While both the browser and the Node.js versions of the library are tested, this starter currently does **not** run the browser tests in a real browser ([AVA](https://github.com/avajs/ava) is currently Node-only). While the current testing system will be sufficient for most use cases, some projects will (also) need to implement a browser-based testing system like [karma-ava](https://github.com/avajs/karma-ava). (Pull requests welcome!) + +Note: test coverage is only checked against the Node.js implementation. This is much simpler, and works well for libraries where the node and browser implementations have different dependencies and only minor adapter code. With only a few lines of differences (e.g. `src/adapters/crypto.browser.ts`), including those few lines in test coverage analysis usually isn't necessary. ### Dependency on `tslib` diff --git a/package.json b/package.json index ab5499e..cf70049 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,8 @@ ], "nyc": { "exclude": [ - "**/*.spec.js" + "**/*.spec.js", + "build/browser/**" ] }, "dependencies": {