Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jestjs/jest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 40b8e1e157c9981dda5a68d73fff647e80fc9f5c
Choose a base ref
...
head repository: jestjs/jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: be16e47afcc9f64653b9a47782cb48a5ca243e65
Choose a head ref
Loading
Showing 1,310 changed files with 68,748 additions and 195,121 deletions.
20 changes: 11 additions & 9 deletions .azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
@@ -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'
2 changes: 0 additions & 2 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -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
144 changes: 51 additions & 93 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,74 @@
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" }}
version: 2.1

aliases:
- &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
jobs:
test-node-10:
working_directory: ~/jest
docker:
- image: circleci/node:10
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit
orbs:
node: circleci/node@4.0.0

test-jest-circus:
working_directory: ~/jest
docker:
- image: circleci/node:12
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
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
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci
- store_test_results:
path: reports/junit

test-node-13:
jobs:
test-node:
parameters:
node-version:
type: string
partial:
type: boolean
default: false
working_directory: ~/jest
docker:
- image: circleci/node:13
executor: node/default
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- node/install:
node-version: << parameters.node-version >>
install-npm: false
- node/install-packages: *install
- when:
condition: << parameters.partial >>
steps:
- run:
command: yarn test-ci-partial
- unless:
condition: << parameters.partial >>
steps:
- run:
command: yarn test-ci
- store_test_results:
path: reports/junit

test-node-14:
test-jest-jasmine:
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:
lts: true
install-npm: false
- node/install-packages: *install
- run:
command: yarn test-ci-partial
command: JEST_JASMINE=1 yarn test-ci-partial && JEST_JASMINE=1 yarn test-leak
- store_test_results:
path: reports/junit

test-or-deploy-website:
working_directory: ~/jest
docker:
- image: circleci/node:12
resource_class: large
steps:
- checkout
- restore-cache: *restore-cache
- run: *install
- save-cache: *save-cache
- run:
name: Test or Deploy Jest Website
command: ./.circleci/website.sh

# Workflows enables us to run multiple jobs in parallel
workflows:
version: 2
build-and-deploy:
jobs:
- test-node-10
- test-node-12
- test-node-13
- test-node-14 # current
- test-jest-circus
- test-or-deploy-website:
filters: *filter-ignore-gh-pages
- test-node:
matrix:
parameters:
node-version: ['14']
- test-node:
name: test-node-partial-<< matrix.node-version >>
partial: true
matrix:
parameters:
node-version: ['10', '12', '15', '16']
- test-jest-jasmine
35 changes: 0 additions & 35 deletions .circleci/website.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -4,10 +4,10 @@ bin/
flow-typed/**
packages/*/build/**
packages/jest-diff/src/cleanupSemantic.ts
website/.docusaurus
website/blog
website/build
website/node_modules
website/i18n/*.js
website/translated_docs
website/static
!.eslintrc.js
14 changes: 14 additions & 0 deletions .eslintplugin/index.js
Original file line number Diff line number Diff line change
@@ -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'),
};
Loading