Skip to content

Commit

Permalink
Update Puppeteer and make tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Schwartz committed Apr 26, 2022
1 parent ab0cacc commit 7c7b51e
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 107 deletions.
174 changes: 77 additions & 97 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/server_manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
}
},
"config": {
"PUPPETEER_CHROMIUM_REVISION": "870763"
"PUPPETEER_CHROMIUM_REVISION": "1086"
},
"devDependencies": {
"@types/node": "^16.11.29",
Expand All @@ -82,7 +82,7 @@
"electron-builder": "~22.10.5",
"electron-icon-maker": "^0.0.4",
"electron-notarize": "^0.2.1",
"electron-to-chromium": "^1.3.752",
"electron-to-chromium": "^1.4.122",
"gulp": "^4.0.0",
"gulp-posthtml": "^3.0.4",
"gulp-replace": "^1.0.0",
Expand All @@ -95,7 +95,7 @@
"postcss": "^7.0.29",
"postcss-rtl": "^1.7.3",
"posthtml-postcss": "^0.2.6",
"puppeteer": "^5.5.0",
"puppeteer": "^13.6.0",
"style-loader": "^1.2.1",
"ts-loader": "^7.0.1",
"webpack": "^4.43.0",
Expand Down
4 changes: 2 additions & 2 deletions src/server_manager/web_app/data_formatting.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ describe('formatBytesParts', () => {
expect(russian.value).toEqual('3');

const simplifiedChinese = formatting.formatBytesParts(1.5 * 10 ** 9, 'zh-CN');
expect(simplifiedChinese.unit).toEqual('吉字节');
expect(simplifiedChinese.unit).toEqual('GB');
expect(simplifiedChinese.value).toEqual('1.5');

const farsi = formatting.formatBytesParts(133.5 * 10 ** 6, 'fa');
expect(farsi.unit).toEqual('مگابایت');
expect(farsi.unit).toEqual('MB');
expect(farsi.value).toEqual('۱۳۳٫۵');
});
}
Expand Down
5 changes: 0 additions & 5 deletions src/server_manager/web_app/data_formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@
limitations under the License.
*/

// import '@formatjs/intl-numberformat/polyfill'

// Utility functions for internationalizing numbers and units

// WARNING! This assumes an ES2020 target as this will always run on browser code in
// electron's built-in Chromium. This code shouldn't be used by anything running in Node.

const TERABYTE = 10 ** 12;
const GIGABYTE = 10 ** 9;
const MEGABYTE = 10 ** 6;
Expand Down

0 comments on commit 7c7b51e

Please sign in to comment.