Merge develop
This commit is contained in:
commit
7c5170da15
193 changed files with 4011 additions and 4462 deletions
|
@ -29,9 +29,9 @@ function detectInCodeUnwrapped(forbidden: string, reason: string): Promise<void>
|
|||
]
|
||||
|
||||
const command =
|
||||
"grep -n \"" +
|
||||
'grep -n "' +
|
||||
forbidden +
|
||||
"\" -r . " +
|
||||
'" -r . ' +
|
||||
excludedDirs.map((d) => "--exclude-dir=" + d).join(" ")
|
||||
console.log(command)
|
||||
exec(command, (error, stdout, stderr) => {
|
||||
|
@ -116,7 +116,15 @@ async function validateScriptIntegrityOf(path: string): Promise<void> {
|
|||
|
||||
const expected = "sha384-" + hashedStr
|
||||
if (expected !== integrity) {
|
||||
const msg = "Loading a script from '" + src + "' in the file " + path + " has a mismatched checksum: expected " + expected + " but the HTML-file contains " + integrity
|
||||
const msg =
|
||||
"Loading a script from '" +
|
||||
src +
|
||||
"' in the file " +
|
||||
path +
|
||||
" has a mismatched checksum: expected " +
|
||||
expected +
|
||||
" but the HTML-file contains " +
|
||||
integrity
|
||||
failed.add(msg)
|
||||
console.warn(msg)
|
||||
}
|
||||
|
@ -129,21 +137,21 @@ describe("Code quality", () => {
|
|||
"should not contain reverse",
|
||||
detectInCode(
|
||||
"reverse()",
|
||||
"Reverse is stateful and changes the source list. This often causes subtle bugs",
|
||||
),
|
||||
"Reverse is stateful and changes the source list. This often causes subtle bugs"
|
||||
)
|
||||
)
|
||||
|
||||
it(
|
||||
"should not contain 'constructor.name'",
|
||||
detectInCode("constructor\\.name", "This is not allowed, as minification does erase names."),
|
||||
detectInCode("constructor\\.name", "This is not allowed, as minification does erase names.")
|
||||
)
|
||||
|
||||
it(
|
||||
"should not contain 'innerText'",
|
||||
detectInCode(
|
||||
"innerText",
|
||||
"innerText is not allowed as it is not testable with fakeDom. Use 'textContent' instead.",
|
||||
),
|
||||
"innerText is not allowed as it is not testable with fakeDom. Use 'textContent' instead."
|
||||
)
|
||||
)
|
||||
|
||||
test("scripts with external sources should have an integrity hash", async () => {
|
||||
|
|
|
@ -884,7 +884,6 @@ describe("ReplaceGeometryAction", () => {
|
|||
)
|
||||
|
||||
it("should move nodes accordingly", async () => {
|
||||
|
||||
const bbox = new BBox([
|
||||
[3.2166673243045807, 51.21467321525788],
|
||||
[3.217007964849472, 51.21482442824023],
|
||||
|
|
|
@ -173,7 +173,7 @@ describe("PrepareTheme", () => {
|
|||
}).convertStrict(layout, ConversionContext.test())
|
||||
expect(rewritten.layers[0]).toEqual(testLayer)
|
||||
expect(rewritten.layers[1]).toEqual({
|
||||
"_basedOn": "layer-example",
|
||||
_basedOn: "layer-example",
|
||||
source: {
|
||||
osmTags: "x=y",
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue