Skip to content

Commit f671f8e

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pr/6334
* upstream/master: (122 commits) fix: don't report promises as open handles (jestjs#6716) support serializing `DocumentFragment` (jestjs#6705) Allow test titles to include array index (jestjs#6414) fix `toContain` suggest to contain equal message (jestjs#6810) fix: testMatch not working with negations (jestjs#6648) Add test cases for jestjs#6744 (jestjs#6772) print stack trace on calls to process.exit (jestjs#6714) Updates SnapshotTesting.md to provide more info. on snapshot scope (jestjs#6735) Mark snapshots as obsolete when moved to an inline snapshot (jestjs#6773) [Docs] Clarified the use of literal values as property matchers in toMatchSnapshot() (jestjs#6807) Update CHANGELOG.md (jestjs#6799) fix changelog entry that is not in 23.4.2 (jestjs#6796) Fix --coverage with --findRelatedTests overwriting collectCoverageFrom options (jestjs#6736) Update testURL default value from about:blank to localhost (jestjs#6792) fix: `matchInlineSnapshot` when prettier dependencies are mocked (jestjs#6776) Fix retryTimes and add e2e regression test (jestjs#6762) Release v23.4.2 Docs/ExpectAPI: Correct docs for `objectContaining` (jestjs#6754) chore(packages/babel-jest) readme (jestjs#6746) docs: noted --coverage aliased by --collectCoverage (jestjs#6741) ...
2 parents 68a822b + 0591f22 commit f671f8e

467 files changed

Lines changed: 19740 additions & 2550 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"transform-flow-strip-types",
55
"transform-es2015-destructuring",
66
"transform-es2015-parameters",
7+
"transform-es2015-shorthand-properties",
78
"transform-es2015-spread",
89
"transform-async-to-generator",
910
"transform-strict-mode",

.circleci/config.yml

Lines changed: 11 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,10 @@ aliases:
1010
- node_modules
1111
- website/node_modules
1212
key: v2-dependencies-{{ .Branch }}-{{ checksum "yarn.lock" }}
13-
14-
- &deploy
15-
command: |
16-
# Deploy Jest website using Docusaurus bot
17-
git config --global user.email "docusaurus-bot@users.noreply.github.com"
18-
git config --global user.name "Website Deployment Script"
19-
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
20-
# install Docusaurus and generate file of English strings
21-
yarn && cd website && yarn write-translations
22-
# crowdin install
23-
sudo apt-get update
24-
sudo apt-get install default-jre rsync
25-
wget https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
26-
sudo dpkg -i crowdin.deb
27-
sleep 5
28-
# translations upload/download
29-
yarn crowdin-upload
30-
yarn crowdin-download
31-
# build and publish website
32-
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
13+
14+
- &filter-ignore-gh-pages
15+
branches:
16+
ignore: gh-pages
3317

3418
version: 2
3519
jobs:
@@ -73,21 +57,6 @@ jobs:
7357
- store_test_results:
7458
path: reports/junit
7559

76-
test-node-9:
77-
working_directory: ~/jest
78-
docker:
79-
- image: circleci/node:9
80-
steps:
81-
- checkout
82-
- restore-cache: *restore-cache
83-
- run: yarn --no-progress
84-
- save-cache: *save-cache
85-
- run:
86-
command: yarn test-ci-partial
87-
environment:
88-
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"
89-
90-
9160
test-jest-circus:
9261
working_directory: ~/jest
9362
docker:
@@ -136,16 +105,19 @@ jobs:
136105
- store_test_results:
137106
path: reports/junit
138107

139-
test-and-deploy-website:
108+
test-or-deploy-website:
140109
working_directory: ~/jest
141110
docker:
142111
- image: circleci/node:8
112+
resource_class: large
143113
steps:
144114
- checkout
145115
- restore-cache: *restore-cache
146116
- run: yarn --no-progress
147117
- save-cache: *save-cache
148-
- deploy: *deploy
118+
- run:
119+
name: Test or Deploy Jest Website
120+
command: ./.circleci/website.sh
149121

150122
# Workflows enables us to run multiple jobs in parallel
151123
workflows:
@@ -156,7 +128,7 @@ workflows:
156128
- test-node-8
157129
- test-node-6
158130
- test-node-10
159-
- test-node-9
160131
- test-jest-circus
161132
- test-browser
162-
- test-and-deploy-website
133+
- test-or-deploy-website:
134+
filters: *filter-ignore-gh-pages

.circleci/website.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
git diff-tree --no-commit-id --name-only -r HEAD > files_changed.txt
6+
if ! grep -E "(^docs\/.*)|(^website\/.*)" files_changed.txt; then
7+
echo "Skipping deploy & test. No relevant website files have changed"
8+
else
9+
echo "Relevant website files have changed"
10+
if [[ $CIRCLE_PROJECT_USERNAME == "facebook" && -z $CI_PULL_REQUEST && -z $CIRCLE_PR_USERNAME ]]; then
11+
# configure Docusaurus bot
12+
git config --global user.email "docusaurus-bot@users.noreply.github.com"
13+
git config --global user.name "Website Deployment Script"
14+
echo "machine github.com login docusaurus-bot password $DOCUSAURUS_PUBLISH_TOKEN" > ~/.netrc
15+
# install Docusaurus and generate file of English strings
16+
yarn && cd website && yarn write-translations
17+
# crowdin install
18+
sudo apt-get update
19+
sudo apt-get install default-jre rsync
20+
wget https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
21+
sudo dpkg -i crowdin.deb
22+
# translations upload/download
23+
yarn crowdin-upload
24+
yarn crowdin-download
25+
# build and publish website
26+
GIT_USER=docusaurus-bot USE_SSH=false yarn publish-gh-pages
27+
else
28+
echo "Skipping deploy. Test website build"
29+
cd website && yarn && yarn build
30+
fi
31+
fi

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = {
2020
{
2121
files: ['*.md'],
2222
rules: {
23+
'arrow-body-style': 0,
2324
'consistent-return': 0,
2425
'flowtype/require-valid-file-annotation': 0,
2526
'import/no-extraneous-dependencies': 0,
@@ -61,6 +62,7 @@ module.exports = {
6162
'examples/**/*',
6263
'scripts/**/*',
6364
'e2e/*/**/*',
65+
'website/*.js',
6466
'website/*/**/*',
6567
'eslintImportResolver.js',
6668
],
@@ -111,6 +113,7 @@ module.exports = {
111113
parser: 'babel-eslint',
112114
plugins: ['markdown', 'import', 'prettier'],
113115
rules: {
116+
'arrow-body-style': 2,
114117
'flowtype/boolean-style': 2,
115118
'flowtype/no-primitive-constructor-types': 2,
116119
'flowtype/require-valid-file-annotation': 2,

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ untyped-import
1818
untyped-type-import
1919

2020
[version]
21-
^0.73.0
21+
^0.75.0

.github/ISSUE_TEMPLATE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
## 👉 [Please follow one of these issue templates](https://github.com/facebook/jest/issues/new/choose) 👈
22

3+
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
4+
35
Note: to keep the backlog clean and actionable, issues may be immediately closed if they do not follow one of the above issue templates.

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: 🐛 Bug report
44
about: Create a report to help us improve
55
---
66

7+
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
8+
79
## 🐛 Bug Report
810

911
A clear and concise description of what the bug is.

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: 🚀 Feature Proposal
44
about: Submit a proposal for a new feature
55
---
66

7+
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
8+
79
## 🚀 Feature Proposal
810

911
A clear and concise description of what the feature is.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ name: 💬 Questions / Help
44
about: If you have questions, please check our Discord or StackOverflow
55
---
66

7+
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
8+
79
## 💬 Questions and Help
810

911
### Please note that this issue tracker is not a help form and this issue will be closed.
1012

1113
For questions or help please see:
1214

13-
- [The Jest help page](https://facebook.github.io/jest/en/help.html)
15+
- [The Jest help page](https://jestjs.io/en/help.html)
1416
- [Our discord channel in Reactiflux](https://discord.gg/MWRhKCj)
1517
- The [jestjs](https://stackoverflow.com/questions/tagged/jestjs) tag on [StackOverflow](https://stackoverflow.com/questions/ask)

.github/ISSUE_TEMPLATE/regression.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ name: 💥 Regression Report
44
about: Report unexpected behavior that worked in previous versions
55
---
66

7+
<!-- Love Jest? Please consider supporting our collective: 👉 https://opencollective.com/jest/donate -->
8+
79
## 💥 Regression Report
810

911
A clear and concise description of what the regression is.

0 commit comments

Comments
 (0)