Commit Graph
72 Commits
Author SHA1 Message Date
fisker Cheung bfb1eacd89 Fix HTML attribute name normalization (#19709) 2026-07-25 08:08:13 +08:00
fisker Cheung 063a29c656 Fix coverage collection (#19459) 2026-06-25 16:03:50 +08:00
renovate[bot]andfisker Cheung a5ba6d426e Update eslint-plugin-unicorn to v65 (#19303)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2026-06-08 17:50:21 +08:00
fisker Cheungandautofix-ci[bot] ed5bb0bf62 Refactor tests (#18743)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-01-25 10:30:19 +08:00
6c339cd882 Upgrade to latest micromark (markdown only) (#18277)
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: seiya <20365512+seiyab@users.noreply.github.com>
2025-12-26 19:43:49 +08:00
fisker Cheung 06a73b700b Run tests in browser (#18521) 2025-12-24 22:57:02 +08:00
fisker Cheung 01363e7310 Refactor builtin plugins creation (#18481) 2025-12-14 23:22:28 +08:00
fisker Cheung e240f15e75 Major refactor (#18381) 2025-12-01 07:25:25 +08:00
fisker Cheung 0f5fee8fac Switch test runner to childProcess (#17571) 2025-06-07 17:25:46 +08:00
fisker Cheung d4fd92e266 Bundle "Experimental CLI" (#17396) 2025-05-06 10:34:05 +08:00
fisker Cheung 05a5ff54d0 Add failed test back (#17384) 2025-04-22 17:17:47 +08:00
fisker Cheung 17a551dea7 Test: Remove --runInBand (#17378) 2025-04-20 22:23:37 +08:00
fisker Cheung 4b2db262b7 Migrated version.evaluate.cjs to ES Module (#17347) 2025-04-16 13:39:48 +08:00
fisker Cheung 377b231a5d Bundle package into dist/prettier/ (#15825) 2025-04-09 08:38:46 +08:00
fisker Cheung 5b3dd6a6ef Add script to ensure format test directories contains format test script (#17077) 2025-02-08 17:27:43 +08:00
fisker Cheung 07b468917e Remove blank lines between imports (#16450) 2024-09-29 17:56:37 +08:00
Klaus Hott Vidalandfisker 16449ce914 renaming jsfmt.spec.js to format.test.js (#16244)
Co-authored-by: fisker <lionkay@gmail.com>
2024-05-06 10:25:10 +08:00
5ceeccf38d chore(deps): update dependency typescript to v5.4.3 (#16181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
Co-authored-by: Sosuke Suzuki <sosuke.suzuki@dr-ubie.com>
2024-04-08 14:26:54 +08:00
Alexander Kachkaev 1ea2fd059a Add eslint-plugin-simple-import-sort (#15817) 2023-12-18 03:34:12 +08:00
renovate[bot]andfisker Cheung c6d08e05e7 chore(deps): update dependency parse-json to v8 (#15590)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
2023-11-06 19:17:31 +08:00
Sosuke Suzuki fa48415617 Bump Prettier dependency to 3.0.0 2023-07-05 21:50:05 +09:00
fisker Cheung 186a177017 Rename .mjs files to .js (#14605) 2023-03-28 16:18:53 +08:00
fisker Cheung 1bdd1d115c Update execa to v6 (#11826) 2021-11-29 10:07:11 +08:00
fisker Cheung 0cc8e96c37 Refactor installPrettier (#11476) 2021-09-09 18:53:31 +08:00
Sosuke Suzuki bf2a24fdd1 Add tests for release script (#11454)
* Install jest

* Configure jest script

* Fix eslintrc

* Add @types/jest

* Add test for validate-new-version

* Fix eslintrc

* Add workflow file

* Add node version

* cd to script/release

* Fix workflow file

* Fix version

* Ignore from root

* Update yarn.lock

* Set defaults.run.working-directory
2021-09-07 14:53:45 +09:00
fisker Cheung 894f841fbd Style: Enforce extensions (#11227) 2021-07-21 09:10:34 +08:00
fisker Cheung 81a1c46311 Minor tweak to js printer (#10954) 2021-05-27 18:00:31 +08:00
fisker Cheung 2783bb41b1 Update jest to v27 (#10947) 2021-05-26 09:03:29 +08:00
fisker Cheung ece93681f1 Restructure test files (#10415) 2021-04-25 20:01:56 +08:00
Georgii Dolzhykov 23b4822e66 Disable Jest's default transformer (Babel) (#10454)
* Disable Jest's default transform (Babel)

https://jestjs.io/docs/en/next/code-transformation#defaults

Otherwise, I sometimes get this error because Babel tries to resolve Browserslist:

----
  ● plugin search should not crash when prettier isn't inside a directory › encountered a declaration exception

    ENOENT: no such file or directory, stat '/mnt/d/dev/prettier/tests_integration/mnt/d/dev/prettier/tests_integration/runPrettier.js'

      52 |   jest.spyOn(fs, "statSync").mockImplementation((filename) => {
      53 |     if (path.basename(filename) === "virtualDirectory") {
    > 54 |       return origStatSync(path.join(__dirname, __filename));
         |              ^
      55 |     }
      56 |     return origStatSync(filename);
      57 |   });

      at Object.<anonymous> (tests_integration/runPrettier.js:54:14)
      at isFile (node_modules/browserslist/node.js:38:42)
      at eachParent (node_modules/browserslist/node.js:46:13)
      at Object.getStat (node_modules/browserslist/node.js:197:15)
      at browserslist (node_modules/browserslist/index.js:433:19)
      at resolveTargets (node_modules/@babel/helper-compilation-targets/lib/index.js:174:46)
----
2021-03-01 13:55:20 +02:00
fisker Cheung 2f4140ff18 Test: Skip install for standalone test (#10273) 2021-02-11 00:50:59 +08:00
fisker Cheung f04b2b991c Enable no-implicit-coercion rule (#10186) 2021-02-01 13:14:04 +08:00
fisker Cheung edf668b173 Refactor needs-parens.js (part 2) (#9498) 2020-10-31 21:14:57 +08:00
fisker Cheung 3dbb584772 Disable Jest verbose, remove pattern for size check job (#9284) 2020-09-28 14:05:46 +08:00
fisker Cheung b77da32a80 Update postcss to v8 (#9209)
* Update `postcss` v8

* Parser custom properties

* Improve logic

* Update lint script

* Fix node location

* Fix comments inside

* Add a test

* Test on `less` and `scss` too

* Fix empty prop print

* Clean

* Update `postcss`

* Exclude `regenerator`

* Test `no-semi`

* Add changelog

* Typo

* Apply review suggestion

* Style

* Simplify logic

* Remove error test, we don't throw on this anymore

* Style

* Update postcss

* Update postcss
2020-09-25 00:51:55 +08:00
fisker Cheung 203be9da5a Change test package name (#8848) 2020-09-18 14:05:29 +08:00
fisker Cheung 47ed40d970 Enable CR test (#9148)
* Enable `CR` test

* Fix tests

* Ignore `standalone.js`
2020-09-17 07:35:33 +08:00
Yuku Kotaniandfisker 549090a5ba Add ESM distributions for browser (#8983)
Co-authored-by: fisker <lionkay@gmail.com>
2020-09-17 00:08:44 +08:00
fisker Cheung 370844cc4c Run full test on every parser (#9070)
* Refactor test

* Fix

* Improve `hasPragma` & `insertPragma` on files has BOM

* Fix `coreFormat` cursorOffset

* Code style

* Update snapshots

* Refactor

* Restore BOM test

* Add export

* Empty file

* return after SyntaxError

* EOL test

* Fix eol tests

* Named export

* Tweak matrix

* Disable on `requirePragma`

* Disable `cr` test

* Simplify logic

* Update `verbose`

* Remove `test:full-test`

* Typo
2020-09-04 23:43:41 +08:00
fisker Cheung fadd93571d Turn test setup file to lazy load (#9080) 2020-08-28 10:02:08 +08:00
fisker Cheung 76f8455f05 Prevent jest warning on production tests (#9022) 2020-08-22 01:00:33 +08:00
fisker Cheung d31ebf4619 Test: Improve coverage (#8811) 2020-08-21 09:43:24 +08:00
fisker Cheung 42dac21e52 Update test:dist-standalone script (#8802) 2020-07-20 20:20:22 +08:00
fisker Cheung d072671842 Test: fix standalone tests with plugins option (#8787) 2020-07-19 17:53:30 +08:00
fisker Cheung 8999cc7811 Format Vue SFC root blocks (#8465) 2020-06-17 19:18:29 +08:00
fisker Cheung 9686475c80 Test: Remove graceful-fs hack (#8245) 2020-05-11 09:05:48 +08:00
fisker Cheung 305fea8a59 Codebase install test (#6373) 2020-04-23 10:37:09 +08:00
fisker Cheung 118b79f0c9 Refactor production tests (#8073) 2020-04-18 01:24:22 +08:00
fisker Cheung 257c9da18a Try upload coverage with token (#7930) 2020-04-01 18:32:39 +03:00
fisker Cheung 412694e1c5 Tweak test and CI configs (#7866)
* Set `jest` verbose to false by default

* Correct `doc-debug.js` path

* Remove outdated ignore patterns

* Exclude Node.js 13 on macos
2020-03-26 17:02:43 +02:00