Switch from prettier to oxfmt (#33844)
* Switch from prettier to oxfmt * Make knip happy * Make knip happy * Apply suggestion from @t3chguy * Rename .oxfmtrc.json to .oxfmtrc.jsonc * Make oxfmt happier
This commit is contained in:
@@ -15,8 +15,8 @@ import InfoDialog from "../../../../../src/components/views/dialogs/InfoDialog";
|
||||
|
||||
describe("<LearnMore />", () => {
|
||||
const defaultProps = {
|
||||
title: "Test",
|
||||
description: "test test test",
|
||||
"title": "Test",
|
||||
"description": "test test test",
|
||||
["data-testid"]: "testid",
|
||||
};
|
||||
const getComponent = (props = {}) => <LearnMore {...defaultProps} {...props} />;
|
||||
|
||||
@@ -202,16 +202,14 @@ describe("<UserInfo />", () => {
|
||||
describe.each([[ProfileKeyTimezone], [ProfileKeyMSC4175Timezone]])("timezone rendering (%s)", (profileKey) => {
|
||||
it("renders user timezone if set", async () => {
|
||||
// For timezone, force a consistent locale.
|
||||
jest.spyOn(global.Date.prototype, "toLocaleString").mockImplementation(function (
|
||||
this: Date,
|
||||
_locale,
|
||||
opts,
|
||||
) {
|
||||
return origDate.call(this, "en-US", {
|
||||
...opts,
|
||||
hourCycle: "h12",
|
||||
});
|
||||
});
|
||||
jest.spyOn(global.Date.prototype, "toLocaleString").mockImplementation(
|
||||
function (this: Date, _locale, opts) {
|
||||
return origDate.call(this, "en-US", {
|
||||
...opts,
|
||||
hourCycle: "h12",
|
||||
});
|
||||
},
|
||||
);
|
||||
mockClient.doesServerSupportExtendedProfiles.mockResolvedValue(true);
|
||||
mockClient.getExtendedProfile.mockResolvedValue({ [profileKey]: "Europe/London" });
|
||||
renderComponent();
|
||||
|
||||
+4
-4
@@ -13,10 +13,10 @@ import FilteredDeviceListHeader from "../../../../../../src/components/views/set
|
||||
|
||||
describe("<FilteredDeviceListHeader />", () => {
|
||||
const defaultProps = {
|
||||
selectedDeviceCount: 0,
|
||||
isAllSelected: false,
|
||||
toggleSelectAll: jest.fn(),
|
||||
children: <div>test</div>,
|
||||
"selectedDeviceCount": 0,
|
||||
"isAllSelected": false,
|
||||
"toggleSelectAll": jest.fn(),
|
||||
"children": <div>test</div>,
|
||||
["data-testid"]: "test123",
|
||||
};
|
||||
const getComponent = (props = {}) => <FilteredDeviceListHeader {...defaultProps} {...props} />;
|
||||
|
||||
Reference in New Issue
Block a user