Skip to content

Commit

Permalink
Merge branch 'master' into uglier-inline-snapshots
Browse files Browse the repository at this point in the history
* master: (398 commits)
  chore(breaking): remove undocumented `enabledTestsMap` config (jestjs#10787)
  Change expect.not.objectContaining() to match documentation (jestjs#10708)
  chore: add name to root project (jestjs#10782)
  Added explanation on how to use custom @jest-environment to docs (jestjs#10783)
  fix: remove deprecated functions from the jest object (jestjs#9853)
  chore: convert jest-runtime to ESM (jestjs#10325)
  fix(resolve): use escalade to find package.json (jestjs#10781)
  feat(jest-runner): set exit code to 1 if test logs after teardown (jestjs#10728)
  chore: add `exports` field to all `package.json`s (jestjs#9921)
  fix: do not inject `global` variable into module wrapper (jestjs#10644)
  chore: migrate jest-resolve to ESM (jestjs#10688)
  chore(transform): refactor API to pass an options bag around rather than multiple boolean options (jestjs#10753)
  chore: default to node test env rather than browser (jestjs#9874)
  fix: drop support for node 13 (jestjs#10685)
  chore: show enhanced syntax error for all syntax errors (jestjs#10749)
  chore: update lockfile after publish
  v26.6.3
  chore: update changelog for release
  Don't throw an error if mock dependency can't be found (jestjs#10779)
  chore: bump babel core types (jestjs#10772)
  ...
  • Loading branch information
jeysal committed Nov 8, 2020
2 parents 7efccac + 4f84f61 commit 13c960e
Show file tree
Hide file tree
Showing 1,003 changed files with 55,391 additions and 175,473 deletions.
20 changes: 11 additions & 9 deletions .azure-pipelines-steps.yml
Expand Up @@ -6,31 +6,33 @@ steps:
- checkout: self
path: jest

# Ensure Node.js 12 is active
# Ensure Node.js 14 is active
- task: NodeTool@0
inputs:
versionSpec: '12.x'
displayName: 'Use Node.js 12'
versionSpec: '14.x'
displayName: 'Use Node.js 14'

# Ensure Python 2.7 is active
- task: UsePythonVersion@0
inputs:
versionSpec: '2.7'
displayName: 'Use Python 2.7'

# Run yarn to install dependencies and build
- script: node scripts/remove-postinstall
displayName: 'Remove postinstall script'
- bash: echo "##vso[task.setvariable variable=folder;isOutput=true]$(yarn config get cacheFolder)"
name: yarnCache

- task: CacheBeta@0
- task: Cache@2
inputs:
key: yarn | $(Agent.OS) | yarn.lock
path: $(YARN_CACHE_FOLDER)
path: $(yarnCache.folder)
displayName: Cache Yarn packages

- script: yarn install-no-ts-build
- script: yarn install --immutable
displayName: 'Install dependencies'

- script: yarn build:js
displayName: 'Transpile TypeScript'

# Run test-ci-partial
- script: yarn run test-ci-partial
displayName: 'Run tests'
Expand Down
2 changes: 0 additions & 2 deletions .azure-pipelines.yml
Expand Up @@ -34,5 +34,3 @@ variables:

# Ensures the handful of tests that should be skipped during CI are
CI: true

YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
126 changes: 46 additions & 80 deletions .circleci/config.yml
@@ -1,130 +1,98 @@
aliases:
- &restore-cache
keys:
- v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
# Fallback in case checksum fails
- v2-dependencies-{{ .Branch }}-

- &save-cache
paths:
- node_modules
- website/node_modules
key: v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}

- &filter-ignore-gh-pages
branches:
ignore: gh-pages
- &install yarn install-no-ts-build
- &install
pkg-manager: yarn
override-ci-command: yarn install --immutable && yarn build:js
cache-path: ~/.yarn/berry/cache
include-branch-in-cache-key: false
app-dir: ~/jest

version: 2
orbs:
node: circleci/node@4.0.0
version: 2.1
jobs:
test-node-8:
working_directory: ~/jest
docker:
- image: circleci/node:8
steps:
- checkout
- run:
command: yarn remove-prettier-dep
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-10:
working_directory: ~/jest
docker:
- image: circleci/node:10
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '10'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-jest-circus:
working_directory: ~/jest
docker:
- image: circleci/node:12
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
lts: true
install-npm: false
- node/install-packages: *install
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial
command: JEST_CIRCUS=1 yarn test-ci-partial && JEST_CIRCUS=1 yarn test-leak
- store_test_results:
path: reports/junit

test-node-12:
working_directory: ~/jest
docker:
- image: circleci/node:12
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '12'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-13:
test-node-14:
working_directory: ~/jest
docker:
- image: circleci/node:13
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '14'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
command: yarn test-ci
- store_test_results:
path: reports/junit

test-node-14:
test-node-15:
working_directory: ~/jest
docker:
- image: circleci/node:14
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
node-version: '15'
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-browser:
working_directory: ~/jest
docker:
- image: circleci/node:12-browsers
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser

test-or-deploy-website:
working_directory: ~/jest
docker:
- image: circleci/node:12
executor: node/default
resource_class: large
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- node/install:
lts: true
install-npm: false
- node/install-packages: *install
- run:
name: Test or Deploy Jest Website
command: ./.circleci/website.sh
Expand All @@ -134,12 +102,10 @@ workflows:
version: 2
build-and-deploy:
jobs:
- test-node-8
- test-node-10
- test-node-12
- test-node-13
- test-node-14 # current
- test-node-14
- test-node-15 # current
- test-jest-circus
- test-browser
- test-or-deploy-website:
filters: *filter-ignore-gh-pages
4 changes: 2 additions & 2 deletions .circleci/website.sh
Expand Up @@ -13,7 +13,7 @@ else
git config --global user.name "Website Deployment Script"
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
# install Docusaurus and generate file of English strings
yarn && cd website && node fetchSupporters.js && yarn write-translations
yarn --immutable && cd website && node fetchSupporters.js && yarn write-translations
# crowdin install
sudo apt-get update
sudo apt-get install default-jre rsync
Expand All @@ -30,6 +30,6 @@ else
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
else
echo "Skipping deploy. Test website build"
cd website && yarn && node fetchSupporters.js && yarn build
yarn --immutable && cd website && node fetchSupporters.js && yarn build
fi
fi
1 change: 0 additions & 1 deletion .eslintignore
Expand Up @@ -3,7 +3,6 @@
bin/
flow-typed/**
packages/*/build/**
packages/*/build-es5/**
packages/jest-diff/src/cleanupSemantic.ts
website/blog
website/build
Expand Down
14 changes: 14 additions & 0 deletions .eslintplugin/index.js
@@ -0,0 +1,14 @@
/**
* Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

exports.rules = {
'ban-types-eventually': require('@typescript-eslint/eslint-plugin').rules[
'ban-types'
],
'prefer-rest-params-eventually': require('eslint/lib/rules/prefer-rest-params'),
'prefer-spread-eventually': require('eslint/lib/rules/prefer-spread'),
};

0 comments on commit 13c960e

Please sign in to comment.