-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8105 from sagemathinc/npm-ts-5.7.3
npm: updating to typescript 5.7.3
- Loading branch information
Showing
13 changed files
with
304 additions
and
249 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,19 +1,32 @@ | ||
import { sha1, uuidsha1 } from "./sha1"; | ||
|
||
const cocalc = "CoCalc"; | ||
const hash = "c898c97dca68742a5a6331f9fa0ca02483cbfd25"; | ||
const uuid = "c898c97d-ca68-4742-a5a6-331f9fa0ca02"; | ||
|
||
describe("compute some sha1 hashes", () => { | ||
it("computes sha1 hash of old SageMathCloud", () => { | ||
// This is mainly for long term backwards compatibility | ||
it("SageMathCloud/string", () => { | ||
expect(sha1("SageMathCloud")).toBe( | ||
"31acd8ca91346abcf6a49d2b1d88333f439d57a6" | ||
"31acd8ca91346abcf6a49d2b1d88333f439d57a6", | ||
); | ||
}); | ||
|
||
it("computes sha1 hash of new CoCalc", () => { | ||
expect(sha1("CoCalc")).toBe("c898c97dca68742a5a6331f9fa0ca02483cbfd25"); | ||
it("CoCalc/string", () => { | ||
expect(sha1(cocalc)).toBe(hash); | ||
}); | ||
|
||
it("CoCalc/Buffer", () => { | ||
expect(sha1(Buffer.from(cocalc))).toBe(hash); | ||
}); | ||
}); | ||
|
||
describe("compute some uuids", () => { | ||
it("computes uuid associated to 'CoCalc'", () => { | ||
expect(uuidsha1("CoCalc")).toBe("c898c97d-ca68-4742-a5a6-331f9fa0ca02"); | ||
describe("UUIDs", () => { | ||
it("CoCalc/string", () => { | ||
expect(uuidsha1(cocalc)).toBe(uuid); | ||
}); | ||
|
||
it("CoCalc/Buffer", () => { | ||
expect(uuidsha1(Buffer.from(cocalc))).toBe(uuid); | ||
}); | ||
}); |
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
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
Oops, something went wrong.