From 3d84d75374d23b035cc87cba14afaa7b761273b7 Mon Sep 17 00:00:00 2001 From: Chad Fawcett Date: Sat, 18 Nov 2017 00:08:07 -0800 Subject: [PATCH] Fix docs overlapping navigation (#4781) * File auto formatting on yarn start * Fix Expect line wrapping * Fix Jest Object line wrapping * Add change to CHANGELOG --- CHANGELOG.md | 2 ++ docs/ExpectAPI.md | 3 ++- docs/JestObjectAPI.md | 3 ++- website/i18n/en.json | 8 ++++++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c76f3c3d6d02..5e6c55ac6477 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -109,6 +109,8 @@ * `[*]` [**BREAKING**] Drop support for Node.js version 4 ([#4769](https://github.com/facebook/jest/pull/4769)) +* `[docs]` Wrap code comments at 80 characters + ([#4781](https://github.com/facebook/jest/pull/4781)) * `[eslint-plugin-jest]` Removed from the Jest core repo, and moved to https://github.com/jest-community/eslint-plugin-jest ([#4867](https://github.com/facebook/jest/pull/4867)) diff --git a/docs/ExpectAPI.md b/docs/ExpectAPI.md index 07e626e7ce74..850681244c41 100644 --- a/docs/ExpectAPI.md +++ b/docs/ExpectAPI.md @@ -875,7 +875,8 @@ describe('toMatchObject applied to arrays arrays', () => { expect([{foo: 'bar'}, {baz: 1}]).toMatchObject([{foo: 'bar'}, {baz: 1}]); }); - // .arrayContaining "matches a received array which contains elements that are *not* in the expected array" + // .arrayContaining "matches a received array which contains elements that + // are *not* in the expected array" test('.toMatchObject does not allow extra elements', () => { expect([{foo: 'bar'}, {baz: 1}]).toMatchObject([{foo: 'bar'}]); }); diff --git a/docs/JestObjectAPI.md b/docs/JestObjectAPI.md index 5c8291672b68..e4611f8b9987 100644 --- a/docs/JestObjectAPI.md +++ b/docs/JestObjectAPI.md @@ -130,7 +130,8 @@ jest.mock('../moduleName', () => { return jest.fn(() => 42); }); -const moduleName = require('../moduleName'); // This runs the function specified as second argument to `jest.mock`. +// This runs the function specified as second argument to `jest.mock`. +const moduleName = require('../moduleName'); moduleName(); // Will return '42'; ``` diff --git a/website/i18n/en.json b/website/i18n/en.json index c1ac497f115f..019a820fe32c 100644 --- a/website/i18n/en.json +++ b/website/i18n/en.json @@ -1,4 +1,5 @@ { + "_comment": "This file is auto-generated by write-translations.js", "localized-strings": { "next": "Next", "previous": "Previous", @@ -24,7 +25,7 @@ "tutorial-jquery": "DOM Manipulation", "tutorial-react": "Testing React Apps", "tutorial-react-native": "Testing React Native Apps", - "TutorialWebpack": "TutorialWebpack", + "tutorial-webpack": "webpack", "using-matchers": "Using Matchers", "webpack": "Using with webpack", "Docs": "Docs", @@ -76,6 +77,9 @@ "In this [video](https://egghead.io/lessons/javascript-test-javascript-with-jest) by [Kent C. Dodds](https://twitter.com/kentcdodds) you will learn how to install Jest and write your first unit test.|no description given": "In this [video](https://egghead.io/lessons/javascript-test-javascript-with-jest) by [Kent C. Dodds](https://twitter.com/kentcdodds) you will learn how to install Jest and write your first unit test.", "Who's using Jest?|no description given": "Who's using Jest?", "Jest is used by teams of all sizes to test web applications, node.js services, mobile apps, and APIs.|no description given": "Jest is used by teams of all sizes to test web applications, node.js services, mobile apps, and APIs.", - "More Jest Users|no description given": "More Jest Users" + "More Jest Users|no description given": "More Jest Users", + "Help Translate|recruit community translators for your project": "Help Translate", + "Edit this Doc|recruitment message asking to edit the doc source": "Edit", + "Translate this Doc|recruitment message asking to translate the docs": "Translate" } } \ No newline at end of file