Skip to content

Commit

Permalink
fix(create fixtures from state): use replace instead of replaceAll
Browse files Browse the repository at this point in the history
replaceAll is supported in nodejs >= v15. Many still use node v12 oder
node v14, so this removes the issue for having to install node v15
just for this function call
  • Loading branch information
Mohammer5 committed Feb 4, 2022
1 parent a0e5127 commit 088a5fc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = function createFixturesFromState(state, cypressConfig) {
(acc, request) => {
const fileName = request.static
? 'static_resources'
: request.featureName.toLowerCase().replaceAll(' ', '_')
: request.featureName.toLowerCase().replace(/\s/g, '_')

if (!acc[fileName]) {
acc[fileName] = []
Expand Down

0 comments on commit 088a5fc

Please sign in to comment.