Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add deprecation warnings and errors flags #402

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ build-common: &common-build
key: v1-dependencies-{{ checksum "package.json" }}

# run tests!
- run: npm run ci
- run:
name: Run Tests
command: npm run ci
environment:
NODE_PENDING_DEPRECATION: 1
NODE_OPTIONS: '--throw-deprecation'

jobs:
node8:
Expand Down Expand Up @@ -66,4 +71,4 @@ workflows:
- node8
- node10
- node12

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"scripts": {
"prebuild": "npm run lint",
"build": "./test/browser/generate-index.sh && npm run build:browser && npm run build:docs",
"build:ci": "./test/browser/generate-index.sh && npm run build:browser",
"build:browser": "webpack --config=config/webpack.config.js",
"build:docs": "npm run build:docs:html && npm run build:docs:markdown",
"build:docs:html": "documentation build index.js -f html -o docs --config documentation.yml",
Expand All @@ -20,7 +21,7 @@
"test:headless": "node test/browser/webpack-test.js",
"test:browser": "opener http://localhost:9007/test/browser/index.html && serve . -p 9007",
"coverage": "nyc report && if [ $CODACY_PROJECT_TOKEN'' != '' ] ; then nyc report --reporter=text-lcov | codacy-coverage; fi",
"ci": "npm run build && npm run test && npm run test:headless && npm run coverage",
"ci": "npm run build:ci && npm run test && npm run test:headless && npm run coverage",
"prerelease": "npm run ci",
"release": "standard-version -s -a",
"lint": "standardx test/*.js index.js lib/*.js test/*/*.js",
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ test(
const breaker = new CircuitBreaker(passFail,
{ errorThresholdPercentage: 1, resetTimeout });

breaker.fire(fails);
breaker.fire(fails).catch(() => {});
breaker.fire(fails)
.catch(() => {
// Now the breaker should be open. Wait for reset and
Expand Down