Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Peter Bengtsson 7586229bf2
switch from @alex_neo/jest-expect-message to jest-expect-message (#33089) 2022-11-30 16:26:58 +00:00
Kevin Heis 303d5190db
Create a translations test suite (#30000)
* Scaffold files for migration

* Move user-agent into unit suite

* Nothing to move from browser suite

* Migrate tests to translations/content

* Migrate existing translation test to meta

* No graphql tests to migrate

* Migrate lint-translation-reporter

* Migrate lint-translation-reporter

* Remove languages-schema, unused

* Restore languages-schema

* Restore languages-schema

* Migrate rendering

* Migrate routing

* Migrate most of unit

* Remove dead files, comment out tests that aren't expected to work yet

* Migrate from get-redirect

* Migrate page and pages

* Migrate linting code

* Fix lint issues

* Found a few more

* Run prettier

* Move crowdin-config test and helper

* Update crowdin-config.js

* Remove translation linting, crowdin config lint, reduce file count

* Remove test that's been skipped for a year

* Restore linting with note to remove later

* Update lint-translation-reporter.js

* Clean up rendering suite

* Update rendering.js

* Remove excessive describe blocks

* Redirect tests

* Clean up unit

* Remove test that's never called

* Don't compare early access

* Rename test suites

* Update "content" tests

* Update files.js

* Update search.js

* Update files.js

* Update files.js
2022-08-25 12:38:03 -07:00
Kevin Heis 2182ff28f3
Next12 now supports ESM (#29295)
* Next12 now supports ESM

* No more michael jackson script extensions

* Fix test running

* Update jest-puppeteer.config.cjs

* Update package.json
2022-07-26 17:53:23 +00:00
Peter Bengtsson 4fcd3ae25f
automatically start server for jest (#26206)
* reinstate

* start server manually

* routing tests too

* skip more

* sleep more and fail if not 200

* use e2etest for content/ too

* automatically start server for jest

* does this work?

* feedbacked

* rename things

* getting it to work

* add dev dependency

* install the right version

* don't need to start that

* fix package lock

* update readme about it

* feedbacked
2022-03-18 21:46:07 +00:00
Robert Sese 8a7301d370
Fail on console.error in tests with failOnConsole (#25600)
* Install jest-fail-on-console

* Setup and use failOnConsole

* Add intentional 'unique key' error

* Revert "Add intentional 'unique key' error"

This reverts commit 5f75f069d80df36ce632421ae7ad26e98ac17ad3.

* Comment about why use this package
2022-02-25 10:49:27 -06:00
Mike Surowiec f3fc80cf05
Upgrade primer/components -> primer/react (#25591)
* upgrade primer/components -> primer/react

* fix jest failure
2022-02-24 00:30:14 +00:00
Grace Park ccaab2b375
updating package with the fix (#20922) 2021-08-17 16:56:55 +00:00
Kevin Heis 8a56437c93
Pretty format (#20352)
* Update prettier flow to include JS

* Run prettier

* ...run prettier
2021-07-14 14:35:01 -07:00
Vanessa Yuen a8d54c9af7
Improvements in tools to help merge crowdin PRs (#18409)
- add `script/test-render-translation.js` to render all translated content to catch malformed liquid that would cause render errors
- improve test output for `script/fix-translation-errors.js` and `tests/content/lint-files.js`
- make it so `script/reset-translated-file.js` can handle files that have been renamed
2021-03-26 19:21:45 +00:00
James M. Greene a469193704
Test workflow and jest configuration cleaning (#17759) 2021-02-09 10:52:28 -06:00
Vanessa Yuen 25ff6b94ff
Translation tools to make our lives easier (#17712)
* create script to fix easy-to-fix frontmatter errors in translation

* improve reset-translated-file.js: allow reverting to the same file from `main` branch

* fix release-notes as well

* also lints liquid in frontmatter
2021-02-09 10:11:12 -05:00
Vanessa Yuen a1d93a7619
Lint translation files (#17561)
### Why:

A lot of content gets mistranslated, some common patterns are: frontmatter date and enums getting translated, liquid tags get translated or go missing during the translation process. These translation errors are tough to catch, especially when they often come in huge PRs. 

### What's being changed:

- Frontmatter is also getting linted against schema as part of `lint-files`
- When an environment variable `TEST_TRANSLATION` is passed,
   - `lint-files` will run its tests against all files that have been newly translated (by git-diffing between `translations` branch and `main` branch), and
   - results are outputted using a custom jest reporter. The output is formatted in a way that makes it easy to exclude the problematic translated files from being merged, and to share the errors with [localization support](https://github.com/github/localization-support/issues/489). 
- Run the implemented translation test as part of the existing `Node.js Tests - Translations` workflow
2021-02-01 17:59:33 +01:00
Sarah Schneider 2c937486bf update helper path in config 2020-11-24 15:41:50 -05:00
Vanessa Yuen 3df90fc9b8 Hello git history spelunker!
Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
2020-09-27 14:10:11 +02:00