Skip to content

Commit

Permalink
chore: update @types/luxon and fix ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eventualbuddha committed Mar 20, 2023
1 parent a368f66 commit 98bbd86
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 66 deletions.
2 changes: 1 addition & 1 deletion apps/central-scan/backend/package.json
Expand Up @@ -82,7 +82,7 @@
"@types/express": "^4.17.14",
"@types/fs-extra": "^9.0.6",
"@types/jest": "^26.0.6",
"@types/luxon": "^1.26.5",
"@types/luxon": "^3.0.0",
"@types/multer": "^1.4.7",
"@types/node": "16.11.29",
"@types/supertest": "^2.0.10",
Expand Down
2 changes: 1 addition & 1 deletion apps/mark/frontend/package.json
Expand Up @@ -132,7 +132,7 @@
"@types/debug": "^4.1.6",
"@types/history": "^4.7.8",
"@types/kiosk-browser": "workspace:*",
"@types/luxon": "^1.26.2",
"@types/luxon": "^3.0.0",
"@types/react-gamepad": "^1.0.0",
"@types/setimmediate": "^1.0.2",
"@types/testing-library__jest-dom": "^5.14.3",
Expand Down
2 changes: 1 addition & 1 deletion apps/scan/backend/package.json
Expand Up @@ -79,7 +79,7 @@
"@types/express": "^4.17.13",
"@types/fs-extra": "^9.0.6",
"@types/jest": "^26.0.6",
"@types/luxon": "^1.26.5",
"@types/luxon": "^3.0.0",
"@types/multer": "^1.4.7",
"@types/node": "16.11.29",
"@types/supertest": "^2.0.10",
Expand Down
2 changes: 1 addition & 1 deletion libs/ballot-interpreter-nh/package.json
Expand Up @@ -43,7 +43,7 @@
"@types/he": "^1.1.2",
"@types/jest": "^27.4.0",
"@types/jsdom": "^20.0.0",
"@types/luxon": "^2.0.9",
"@types/luxon": "^3.0.0",
"@types/tmp": "^0.2.3",
"@typescript-eslint/eslint-plugin": "^5.37.0",
"@typescript-eslint/parser": "^5.37.0",
Expand Down
2 changes: 1 addition & 1 deletion libs/test-utils/package.json
Expand Up @@ -49,7 +49,7 @@
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/kiosk-browser": "workspace:*",
"@types/luxon": "^1.26.5",
"@types/luxon": "^3.0.0",
"@types/react": "17.0.39",
"@types/zip-stream": "workspace:*",
"@typescript-eslint/eslint-plugin": "^5.37.0",
Expand Down
2 changes: 1 addition & 1 deletion libs/types/package.json
Expand Up @@ -47,7 +47,7 @@
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/kiosk-browser": "workspace:*",
"@types/luxon": "^2.3.2",
"@types/luxon": "^3.0.0",
"@types/node": "16.11.29",
"@types/react": "17.0.39",
"@typescript-eslint/eslint-plugin": "^5.37.0",
Expand Down
2 changes: 1 addition & 1 deletion libs/ui/package.json
Expand Up @@ -80,7 +80,7 @@
"@types/history": "4",
"@types/jest": "^27.0.3",
"@types/kiosk-browser": "workspace:*",
"@types/luxon": "^1.26.5",
"@types/luxon": "^3.0.0",
"@types/node": "16.11.29",
"@types/pluralize": "^0.0.29",
"@types/react": "17.0.39",
Expand Down
40 changes: 22 additions & 18 deletions libs/ui/src/set_clock.test.tsx
Expand Up @@ -23,15 +23,17 @@ function getSelect(testId: string): HTMLSelectElement {
return screen.getByTestId(testId);
}

const aDate = DateTime.fromObject({
year: 2021,
month: 3,
day: 31,
hour: 19,
minute: 34,
second: 56,
zone: 'America/Los_Angeles',
});
const aDate = DateTime.fromObject(
{
year: 2021,
month: 3,
day: 31,
hour: 19,
minute: 34,
second: 56,
},
{ zone: 'America/Los_Angeles' }
);

describe('PickDateTimeModal', () => {
test('shows pickers for the datetime parts of the given time', () => {
Expand Down Expand Up @@ -141,15 +143,17 @@ describe('PickDateTimeModal', () => {
// Expect a changed timezone
expect(onSave).toHaveBeenNthCalledWith(
3,
DateTime.fromObject({
year: aDate.year,
month: aDate.month,
day: changedDay,
hour: aDate.hour,
minute: aDate.minute,
second: 0,
zone: 'America/Chicago',
})
DateTime.fromObject(
{
year: aDate.year,
month: aDate.month,
day: changedDay,
hour: aDate.hour,
minute: aDate.minute,
second: 0,
},
{ zone: 'America/Chicago' }
)
);
});

Expand Down
2 changes: 1 addition & 1 deletion libs/ui/src/tally_report_metadata.test.tsx
Expand Up @@ -25,6 +25,6 @@ test('Renders report metadata', () => {
getByText(/Choctaw County/);
getByText(/State of Mississippi/);
getByText(
/This report was created on Tuesday, November 3, 2020 at 10:22:00 PM UTC/
/This report was created on Tuesday, November 3, 2020, 10:22:00 PM UTC/
);
});
2 changes: 1 addition & 1 deletion libs/utils/package.json
Expand Up @@ -56,7 +56,7 @@
"@types/fast-text-encoding": "^1.0.1",
"@types/jest": "^27.0.3",
"@types/kiosk-browser": "workspace:*",
"@types/luxon": "^1.26.5",
"@types/luxon": "^3.0.0",
"@types/randombytes": "^2.0.0",
"@types/yargs": "^17.0.12",
"@typescript-eslint/eslint-plugin": "^5.37.0",
Expand Down
64 changes: 25 additions & 39 deletions pnpm-lock.yaml

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

0 comments on commit 98bbd86

Please sign in to comment.