Skip to content

Commit

Permalink
fix: remove file name limit. closes #30
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jul 10, 2024
1 parent 7502e47 commit fbeb739
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ exports.toMatchFile = function toMatchFile(content, filepath, options = {}) {
path.join(
path.dirname(this.testPath),
'__file_snapshots__',
`${filenamify(this.currentTestName, {
replacement: '-',
}).replace(/\s/g, '-')}-${this.assertionCalls}`
`${filenamify(
this.currentTestName,
{
replacement: '-',
},
{ maxLength: Infinity }
).replace(/\s/g, '-')}-${this.assertionCalls}`
) + fileExtension
: filepath;

Expand Down

0 comments on commit fbeb739

Please sign in to comment.