-
Notifications
You must be signed in to change notification settings - Fork 937
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix: Cloud Functions Runtime Config Hash Value (#5355)
Bug fix: convert runtime configuration into a sorted array
- Loading branch information
1 parent
b501f07
commit 127ca3f
Showing
3 changed files
with
65 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
- Fix bug where CLI was unable to deploy Firebase Functions in some monorepo setups (#5391) | ||
- Upgrade Storage Rules Runtime to v1.1.3 to support ternary operators (#5370) | ||
- Fixes an issue where already deployed functions with the same remote configuration do not get skipped (#5354) |
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,48 @@ | ||
import { expect } from "chai"; | ||
import * as prepareFunctionsUpload from "../../../deploy/functions/prepareFunctionsUpload"; | ||
|
||
describe("prepareFunctionsUpload", () => { | ||
describe("convertToSortedKeyValueArray", () => { | ||
it("should deep sort the resulting array when an input config object is not sorted", () => { | ||
const config = { | ||
b: "b", | ||
a: { | ||
b: { | ||
c: "c", | ||
a: "a", | ||
}, | ||
a: "a", | ||
}, | ||
}; | ||
const expected = [ | ||
{ | ||
key: "a", | ||
value: [ | ||
{ key: "a", value: "a" }, | ||
{ | ||
key: "b", | ||
value: [ | ||
{ | ||
key: "a", | ||
value: "a", | ||
}, | ||
{ | ||
key: "c", | ||
value: "c", | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
{ key: "b", value: "b" }, | ||
]; | ||
expect(prepareFunctionsUpload.convertToSortedKeyValueArray(config)).to.deep.equal(expected); | ||
}); | ||
it("should return null when config input is null", () => { | ||
expect(prepareFunctionsUpload.convertToSortedKeyValueArray(null)).to.be.equal(null); | ||
}); | ||
it("should return an empty array when config input is an empty object", () => { | ||
expect(prepareFunctionsUpload.convertToSortedKeyValueArray({})).to.deep.equal([]); | ||
}); | ||
}); | ||
}); |