slideshow
This commit is contained in:
1 parent
988a5410f7
commit
262b853c5b
18 files changed
+1305
-30
No files matched your search
@@ -19,7 +19,11 @@ describe('Snippets: Date & Time', () => {
|
||||
const body = $('#editor-body');
|
||||
typeSnippet(body, '?dat');
|
||||
await sleep(100);
|
||||
const today = new Date().toISOString().substring(0, 10);
|
||||
// Match editor's local-time formatting (not UTC) so the assertion doesn't
|
||||
// drift at midnight depending on timezone offset.
|
||||
const d = new Date();
|
||||
const pad = n => String(n).padStart(2, '0');
|
||||
const today = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
||||
expect(body.value).toContain(today);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user