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: b16789230fd45056a7f2fa199bae06c7a1780deb
Choose a base ref
...
head repository: jestjs/jest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 343532a21f640ac2709c4076eef57e52279542e1
Choose a head ref

Commits on Feb 5, 2019

  1. Release 24.1.0

    rubennorte committed Feb 5, 2019
    Copy the full SHA
    8a2ea1e View commit details
  2. chore: new version of website

    SimenB committed Feb 5, 2019
    Copy the full SHA
    13fdc60 View commit details
  3. Fix typo in question.md issue template (#7806)

    ## Summary
    
    Trivial. Replace "form" with "forum" in issue template.
    
    ## Test plan
    
    Skipped tests, as this is a minor typo fix in a GitHub issue template.
    hramos authored and thymikee committed Feb 5, 2019
    Copy the full SHA
    1b31e58 View commit details

Commits on Feb 6, 2019

  1. Copy the full SHA
    d792940 View commit details
  2. Copy the full SHA
    bc0f21d View commit details
  3. docs: link to json output example

    OlivierJM authored and SimenB committed Feb 6, 2019
    Copy the full SHA
    80bde48 View commit details
  4. Copy the full SHA
    d1ad66e View commit details
  5. Copy the full SHA
    d4018a8 View commit details
  6. Copy the full SHA
    e8f5d62 View commit details
  7. 3
    Copy the full SHA
    0c07df0 View commit details
  8. Copy the full SHA
    4621d05 View commit details

Commits on Feb 7, 2019

  1. Copy the full SHA
    20f037f View commit details
  2. Copy the full SHA
    5c18df6 View commit details
  3. Copy the full SHA
    a639d5c View commit details
  4. Copy the full SHA
    e67c818 View commit details
  5. Copy the full SHA
    605e199 View commit details
  6. Migrate jest-changed-files to Typescript (#7827)

    * Migrate jest-changed-files to Typescript
    
    * Add changelog entry
    
    * Update e2e/__tests__/jestChangedFiles.test.js
    
    Co-Authored-By: loryman <lorenzo.rapetti.94@gmail.com>
    
    * Stricter typings
    
    
    Merge remote-tracking branch 'origin/jest-changed-files-typescript' into jest-changed-files-typescript
    
    * Make prettier happy
    lorenzorapetti authored and SimenB committed Feb 7, 2019
    Copy the full SHA
    ba4e963 View commit details

Commits on Feb 8, 2019

  1. chore: Remove redundant stripAnsi from test (#7833)

    ## Summary
    
    It doesn't make sense to wrap a `runJust` call into `stripAnsi` since the latter works only with strings.
    `runJest` returns an object so stripAnsi just passes it along.
    
    Materials:
    
    - Commit where the code was added in the first place: e12cab6#diff-4cf7d6c79ff377b63522b3af20e34e8eR307
    - stripAnsi source code: https://github.com/chalk/strip-ansi/blob/097894423fedb6b4dca3005ad45608b893fcdcf8/index.js
    vitkarpov authored and thymikee committed Feb 8, 2019
    Copy the full SHA
    cd77749 View commit details
  2. Copy the full SHA
    080998e View commit details
  3. chore: migrate jest-matcher-util to TypeScript (#7835)

    * chore: migrate jest-matcher-util to TypeScript
    
    * link to PR
    
    * unknown and fix flow
    SimenB authored Feb 8, 2019
    Copy the full SHA
    7906f1d View commit details
  4. Copy the full SHA
    d96ff2c View commit details

Commits on Feb 9, 2019

  1. Copy the full SHA
    9a0b348 View commit details
  2. Copy the full SHA
    dc35500 View commit details

Commits on Feb 10, 2019

  1. Copy the full SHA
    f57e288 View commit details
  2. Copy the full SHA
    842f389 View commit details
  3. Copy the full SHA
    100b033 View commit details
  4. Copy the full SHA
    00e52eb View commit details
  5. Copy the full SHA
    b49075e View commit details

Commits on Feb 11, 2019

  1. Copy the full SHA
    cc0437d View commit details
  2. Copy the full SHA
    384a375 View commit details
  3. Copy the full SHA
    780c838 View commit details

Commits on Feb 12, 2019

  1. Copy the full SHA
    4b07a67 View commit details
  2. Use symbol instead of Symbol (#7869)

    bokuweb authored and SimenB committed Feb 12, 2019
    Copy the full SHA
    2688c2d View commit details
  3. expect: Improve report when matcher fails, part 7 (#7866)

    * expect: Improve report when matcher fails, part 7
    
    * Update CHANGELOG.md
    pedrottimark authored and thymikee committed Feb 12, 2019
    Copy the full SHA
    bb471f0 View commit details
  4. Copy the full SHA
    1df98cb View commit details
  5. Fix image URLs (#7872)

    georgeblahblah authored and SimenB committed Feb 12, 2019
    Copy the full SHA
    9ba62ad View commit details

Commits on Feb 13, 2019

  1. Copy the full SHA
    3f19f67 View commit details
  2. Fix custom async matcher stack traces (#7652)

    Don Schrimsher authored and SimenB committed Feb 13, 2019
    Copy the full SHA
    a4a04b2 View commit details
  3. Copy the full SHA
    00bd060 View commit details
  4. chore: fix test for node 6

    SimenB committed Feb 13, 2019
    Copy the full SHA
    e136b8d View commit details
  5. Copy the full SHA
    300de98 View commit details
  6. Copy the full SHA
    f27d1c1 View commit details
  7. chore: use more private (#7882)

    SimenB authored Feb 13, 2019
    Copy the full SHA
    0cf47c4 View commit details
  8. Copy the full SHA
    5050654 View commit details
  9. Copy the full SHA
    9e31173 View commit details

Commits on Feb 14, 2019

  1. Copy the full SHA
    af1ab24 View commit details
  2. Typo fix in code comment (#7897)

    DenrizSusam authored and SimenB committed Feb 14, 2019
    Copy the full SHA
    02c0237 View commit details
  3. fix: validating async functions (#7894) (#7896)

    ## Summary
    
    `jest-validate` distinguishes between sync and async functions, but it should not. Fixes #7894.
    
    ## Test plan
    
    ```js
    const { validate } = require('jest-validate')
    assert(validate({ name: async () => {} }, { exampleConfig: { name: () => {} } }).isValid)
    assert(validate({ name: () => {} }, { exampleConfig: { name: async () => {} } }).isValid)
    assert(validate({ name: async () => {} }, { exampleConfig: { name: async () => {} } }).isValid)
    assert(validate({ name: () => {} }, { exampleConfig: { name: () => {} } }).isValid)
    ```
    ehmicky authored and thymikee committed Feb 14, 2019
    Copy the full SHA
    0c1d5f9 View commit details
  4. Copy the full SHA
    696d424 View commit details
  5. Copy the full SHA
    06c2567 View commit details
Showing 2,222 changed files with 282,961 additions and 92,729 deletions.
31 changes: 15 additions & 16 deletions .azure-pipelines-steps.yml
Original file line number Diff line number Diff line change
@@ -2,44 +2,43 @@
# Steps for building and testing Jest. See jobs defined in .azure-pipelines.yml
#

# Clones the repo
steps:
- checkout: self
path: jest

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

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

# Workaround to move source files under a "jest" folder (see .azure-pipelines.yml for details)
- script: |
cd /
mv $(Build.Repository.LocalPath) $(JEST_DIR)
mkdir $(Build.Repository.LocalPath)
displayName: 'Move source into jest folder'
# Run yarn to install dependencies and build
- script: yarn --frozen-lockfile
workingDirectory: $(JEST_DIR)
displayName: 'Install dependencies and build'
- script: node scripts/remove-postinstall
displayName: 'Remove postinstall script'

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

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

# Run test-ci-partial
- script: yarn run test-ci-partial
workingDirectory: $(JEST_DIR)
displayName: 'Run tests'

# Publish CI test results
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/reports/junit/*.xml'
searchFolder: $(JEST_DIR)
testRunTitle: 'CI Tests $(Agent.OS)'
displayName: 'Publish test results'
condition: succeededOrFailed()
8 changes: 3 additions & 5 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ jobs:

- job: macOS
pool:
vmImage: macos-10.13
vmImage: macos-10.15
steps:
# This step can be removed once Mercurial gets installed on the macOS image. See https://github.com/Microsoft/azure-pipelines-image-generation/issues/604
- script: HOMEBREW_NO_AUTO_UPDATE=1 brew install mercurial
@@ -32,9 +32,7 @@ variables:
# Used by chalk. Ensures output from Jest includes ANSI escape characters that are needed to match test snapshots.
FORCE_COLOR: 1

# By default, Azure Pipelines clones to an "s" directory, which causes tests to fail due to assumption of Jest being run from a "jest" directory.
# See packages/jest-message-util/src/index.js PATH_JEST_PACKAGES for more details.
JEST_DIR: $(Agent.BuildDirectory)/jest

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

YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
73 changes: 23 additions & 50 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -14,114 +14,89 @@ aliases:
- &filter-ignore-gh-pages
branches:
ignore: gh-pages
- &install yarn install-no-ts-build

version: 2
jobs:
lint-and-typecheck:
test-node-10:
working_directory: ~/jest
docker:
- image: circleci/node:10
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: echo server.max_workers=1 >> .flowconfig
- run: yarn lint --format junit -o reports/junit/js-lint-results.xml && yarn typecheck && yarn lint-es5-build --format junit -o reports/junit/js-es5-lint-results.xml && yarn lint:md:ci && yarn check-copyright-headers
- store_test_results:
path: reports/junit

test-node-6:
working_directory: ~/jest
docker:
- image: circleci/node:6
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile --ignore-engines
- run: *install
- save-cache: *save-cache
- run:
# react-native does not work with node 6
command: rm -rf examples/react-native && yarn test-ci-partial
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

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

test-jest-circus:
test-node-13:
working_directory: ~/jest
docker:
- image: circleci/node:10
- image: circleci/node:13
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- run: *install
- save-cache: *save-cache
- run:
command: JEST_CIRCUS=1 yarn test-ci-partial
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-node-11:
test-node-14:
working_directory: ~/jest
docker:
- image: circleci/node:11
- image: circleci/node:14
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- run: *install
- save-cache: *save-cache
- run:
command: yarn test-ci-partial
- store_test_results:
path: reports/junit

test-browser:
working_directory: ~/jest
docker:
- image: circleci/node:10-browsers
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- save-cache: *save-cache
- run: yarn test-ci-es5-build-in-browser

test-or-deploy-website:
working_directory: ~/jest
docker:
- image: circleci/node:10
- image: circleci/node:12
resource_class: large
steps:
- checkout
- restore-cache: *restore-cache
- run: yarn --no-progress --frozen-lockfile
- run: *install
- save-cache: *save-cache
- run:
name: Test or Deploy Jest Website
@@ -132,12 +107,10 @@ workflows:
version: 2
build-and-deploy:
jobs:
- lint-and-typecheck
- test-node-6
- test-node-8
- test-node-10
- test-node-12
- test-node-13
- test-node-14 # current
- test-jest-circus
- test-node-11 # current
- test-browser
- test-or-deploy-website:
filters: *filter-ignore-gh-pages
12 changes: 8 additions & 4 deletions .circleci/website.sh
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
set -e

git diff-tree --no-commit-id --name-only -r HEAD > files_changed.txt
if ! grep -E "(^docs\/.*)|(^website\/.*)" files_changed.txt; then
if ! grep -E "(^docs\/.*)|(^website\/.*)|(^\.circleci/website\.sh$)" files_changed.txt; then
echo "Skipping deploy & test. No relevant website files have changed"
else
echo "Relevant website files have changed"
@@ -13,19 +13,23 @@ 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 && yarn write-translations
yarn && cd website && node fetchSupporters.js && yarn write-translations
# crowdin install
sudo apt-get update
sudo apt-get install default-jre rsync
wget https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
sudo dpkg -i crowdin.deb
# translations upload/download
yarn crowdin-upload
yarn crowdin-download
# download only enabled languages
for lang in ja es-ES ro zh-CN pt-BR ru uk
do
yarn crowdin-download -l $lang
done
# build and publish website
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
else
echo "Skipping deploy. Test website build"
cd website && yarn && yarn build
cd website && yarn && node fetchSupporters.js && yarn build
fi
fi
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
#
# Some of these options are also respected by Prettier

root = true

[*]
indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.md,*.snap}]
[*.{md,snap}]
trim_trailing_whitespace = false
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -3,10 +3,11 @@
bin/
flow-typed/**
packages/*/build/**
packages/*/build-es5/**
packages/jest-diff/src/cleanupSemantic.ts
website/blog
website/build
website/node_modules
website/i18n/*.js
website/translated_docs
website/static
!.eslintrc.js
Loading