Skip to content

Commit

Permalink
fix: replace ':' with '-' in generated dir for better fs compatibility (
Browse files Browse the repository at this point in the history
  • Loading branch information
noomorph authored and rotemmiz committed Jul 19, 2018
1 parent a6957fc commit de5cc9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`getTimeStampString should format date 1`] = `"2015-06-15 15:02:58Z"`;
exports[`getTimeStampString should format date 1`] = `"2015-06-15 15-02-58Z"`;
3 changes: 2 additions & 1 deletion detox/src/artifacts/utils/getTimeStampString.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function getTimeStampString(date = new Date()) {
return date.toISOString()
.replace(/T/, ' ')
.replace(/\.\d{3}/, '');
.replace(/\.\d{3}/, '')
.replace(/:/g, '-');
}

module.exports = getTimeStampString;

0 comments on commit de5cc9a

Please sign in to comment.