-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: departures multi-section auto-sizing
* Update departures widget generation to pass layout parameters from configuration to the frontend. * Replace existing auto-sizing implementation, which only worked for a single section, with a version that handles multiple sections using the layout parameters. * The auto-sizing itself (independent of the React component) is unit-tested. These are the first real frontend tests in Screens, so we take the opportunity to: * Update Jest to its latest version. * Replace the third-party `@types/jest` package with a direct dependency on `@jest/globals`, which is already part of Jest. The only advantage of the former is that it allows using `describe`, `test`, etc. without importing them. * Add `eslint-plugin-jest` to our ESLint setup. * Add `fishery` for defining factories to build test data.
- Loading branch information
1 parent
e00c977
commit 6593dd0
Showing
23 changed files
with
8,353 additions
and
16,847 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.departures-container { | ||
height: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// https://jestjs.io/docs/configuration | ||
|
||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
/* global require, module */ | ||
|
||
const requireJSON5 = require("require-json5"); | ||
const { pathsToModuleNameMapper } = require("ts-jest"); | ||
const { compilerOptions } = requireJSON5("./tsconfig"); | ||
|
||
/** @type {import('jest').Config} */ | ||
module.exports = { | ||
preset: "ts-jest", | ||
errorOnDeprecated: true, | ||
resetMocks: true, | ||
roots: ["<rootDir>"], | ||
modulePaths: [compilerOptions.baseUrl], | ||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths), | ||
}; |
Oops, something went wrong.