Skip to content

Commit

Permalink
Merge pull request #569 from wheresrhys/node-fetch-3
Browse files Browse the repository at this point in the history
run tests against node-fetch@3 beta
  • Loading branch information
wheresrhys committed May 31, 2020
2 parents 3d10a0e + 7abb49e commit c64d269
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 23 deletions.
50 changes: 29 additions & 21 deletions .circleci/config.yml
Expand Up @@ -6,7 +6,11 @@ references:
filters:
tags:
only: /.*/

build-lint-unit: &build-lint-unit
requires:
- test
- lint
- build

nodejs: &nodejs
docker:
Expand Down Expand Up @@ -96,6 +100,13 @@ jobs:
- run: npm install node-fetch@1
- run: FETCH_MOCK_SRC=../cjs/server.js make test

nodefetch3:
<<: *nodejs
steps:
- *workspace
- run: npm install node-fetch@next
- run: FETCH_MOCK_SRC=../cjs/server.js make test

es5:
<<: *node6
steps:
Expand Down Expand Up @@ -151,60 +162,57 @@ workflows:
<<: *triggerable-by-tag
requires:
- checkout_code
# could be parallel with build, lint, and unit but it's a slow job
# And circlecifree tier only has 3 concurrent jobs, so overall faster
# to defer
- typecheck:
<<: *triggerable-by-tag
requires:
- checkout_code
<<: *build-lint-unit
- lint:
<<: *triggerable-by-tag
requires:
- checkout_code
- build:
<<: *triggerable-by-tag
requires:
- lint
- test
- checkout_code
- nodefetch1:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- nodefetch2:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- nodefetch3:
<<: *triggerable-by-tag
<<: *build-lint-unit
- es5:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
# - esm:
# <<: *triggerable-by-tag
# requires:
# - build
- node10:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- node13:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- node14:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- chrome:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- firefox:
<<: *triggerable-by-tag
requires:
- build
<<: *build-lint-unit
- deploy:
context: wheresrhys-npm-publish
requires:
- nodefetch1
- nodefetch2
- nodefetch3
- es5
- chrome
- firefox
Expand Down
4 changes: 2 additions & 2 deletions test/specs/routing/function-matching.test.js
Expand Up @@ -62,8 +62,8 @@ describe('function matching', () => {
// same properties in the browser and nodejs
const propertyToCheck = new fm.config.Request('http://example.com').cache
? 'credentials'
: 'timeout';
const valueToSet = propertyToCheck === 'credentials' ? 'include' : 2000;
: 'compress';
const valueToSet = propertyToCheck === 'credentials' ? 'include' : false;

fm.mock(
(url, options, request) => request[propertyToCheck] === valueToSet,
Expand Down

0 comments on commit c64d269

Please sign in to comment.