Comparing version 19.1.1 to 19.1.2
{ | ||
"name": "uitest", | ||
"version": "19.1.1", | ||
"version": "19.1.2", | ||
"description": "Run mocha in a browser environment.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
;(function() { | ||
'use strict'; | ||
function getUUID() { | ||
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' | ||
.replace(/[xy]/g, function(c) { | ||
const r = Math.random() * 16 | 0; | ||
const v = c === 'x' ? r : (r & 0x3 | 0x8); | ||
return v.toString(16); | ||
}); | ||
} | ||
if (!window.__execCommand) { | ||
@@ -55,3 +64,3 @@ window.__execCommand = async () => {}; | ||
return new Promise((resolve, reject) => { | ||
const name = `${new Date().getTime()}.png`; | ||
const name = `${getUUID()}.png`; | ||
this.appendToContext(context, `./screenshots/${name}`); | ||
@@ -58,0 +67,0 @@ resolve(this.screenshot(name)); |
548289
14512