зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1681055 - [devtools] Add test case to check pretty-printing works on async function in console editor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D99321
This commit is contained in:
Родитель
36ec5c6448
Коммит
51d30788b3
|
@ -108,6 +108,12 @@ add_task(async function() {
|
|||
"{\n\tx: 1,\n\ty: 2\n}",
|
||||
"{\n x: 1,\n y: 2\n}",
|
||||
],
|
||||
[
|
||||
"async function test() {await new Promise(res => {})}",
|
||||
"async function test() {\n await new Promise(res => {})\n}",
|
||||
"async function test() {\n\tawait new Promise(res => {})\n}",
|
||||
"async function test() {\n await new Promise(res => {})\n}",
|
||||
],
|
||||
];
|
||||
|
||||
const prettyPrintButton = toolbar.querySelector(
|
||||
|
|
|
@ -2,11 +2,26 @@
|
|||
|
||||
1. `git clone https://github.com/beautify-web/js-beautify.git`
|
||||
|
||||
2. Copy `js/lib/beautify.js` to `devtools/shared/jsbeautify/src/beautify-js.js`
|
||||
2. `cd js-beautify`
|
||||
|
||||
3. Copy `beautify-html.js` to `devtools/shared/jsbeautify/src/beautify-html.js`
|
||||
3. Retrieve the latest tag with
|
||||
|
||||
4. Replace the following line at the bottom of the file:
|
||||
```
|
||||
git describe --tags `git rev-list --tags --max-count=1`
|
||||
```
|
||||
|
||||
4. Move to the latest tag `git checkout ${latestTag}` (`${latestTag}` should be replaced with
|
||||
what was printed at step 3).
|
||||
|
||||
5. `npm install`
|
||||
|
||||
6. `npx webpack`
|
||||
|
||||
7. Copy `js/lib/beautify.js` to `devtools/shared/jsbeautify/src/beautify-js.js`
|
||||
|
||||
8. Copy `js/lib/beautify-html.js` to `devtools/shared/jsbeautify/src/beautify-html.js`
|
||||
|
||||
9. Replace the following line at the bottom of the file:
|
||||
|
||||
```
|
||||
var js_beautify = require('./beautify.js');
|
||||
|
@ -18,4 +33,4 @@ with (changing `beautify.js` into `beautify-js.js`):
|
|||
var js_beautify = require('./beautify-js.js');
|
||||
```
|
||||
|
||||
6. Copy `beautify-css.js` to `devtools/shared/jsbeautify/src/beautify-css.js`
|
||||
10. Copy `js/lib/beautify-css.js` to `devtools/shared/jsbeautify/src/beautify-css.js`
|
||||
|
|
Загрузка…
Ссылка в новой задаче