mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Much more thorough tests! (#1053)
This commit is contained in:
parent
d4ff5cb926
commit
bd7856adf3
22 changed files with 11883 additions and 24 deletions
10
src/utils.ts
10
src/utils.ts
|
@ -3,7 +3,17 @@ import { getZoomOrigin } from "./scene";
|
|||
|
||||
export const SVG_NS = "http://www.w3.org/2000/svg";
|
||||
|
||||
let mockDateTime: string | null = null;
|
||||
|
||||
export function setDateTimeForTests(dateTime: string) {
|
||||
mockDateTime = dateTime;
|
||||
}
|
||||
|
||||
export function getDateTime() {
|
||||
if (mockDateTime) {
|
||||
return mockDateTime;
|
||||
}
|
||||
|
||||
const date = new Date();
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth() + 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue