Skip to content

Commit

Permalink
clean template path from snapshot data
Browse files Browse the repository at this point in the history
  • Loading branch information
okv committed Sep 3, 2019
1 parent 1820c2d commit 38709a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Current parameters: {
"migrationNumberFormat": "sequentialNumber",
"trace": true,
"loadConfig": true,
"template": "/home/oleg/work/repository/git-hub/east/lib/migrationTemplate.js"
"template": "[Migration template]"
}
Error: Migration directory "[Migrations dir]" already exists
Expand Down
5 changes: 5 additions & 0 deletions testUtils/cleanSnapshotData.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const migrationsDirRegExp = new RegExp(
'/.+/migrations',
'g'
);
const migrationTemplateRegExp = new RegExp(
'/.+/migrationTemplate.js',
'g'
);
const eastStackTraceRegExp = new RegExp(
'^.*at.*\\(.*/east/.*(([\\r\\n])+ {4}at <anonymous>)?',
'gm'
Expand All @@ -12,6 +16,7 @@ const eastStackTraceRegExp = new RegExp(
module.exports = (data) => {
return (
data.replace(migrationsDirRegExp, '[Migrations dir]')
.replace(migrationTemplateRegExp, '[Migration template]')
.replace(eastStackTraceRegExp, '[East source stack trace]')
);
};

0 comments on commit 38709a7

Please sign in to comment.