Skip to content

Commit 1b60c7b

Browse files
jankucavdemedes
authored and
vdemedes
committed
add support for *.spec.js file naming, closes #216
1 parent 05bee73 commit 1b60c7b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cli.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ function prefixTitle(file) {
6666
base += path.sep;
6767

6868
var prefix = path.relative(process.cwd(), file)
69+
.replace(base, '')
70+
.replace(/\.spec/, '')
6971
.replace(/test\-/g, '')
7072
.replace(/\.js$/, '')
71-
.replace(base, '')
72-
.split(path.sep).join(separator);
73+
.split(path.sep)
74+
.join(separator);
7375

7476
if (prefix.length > 0) {
7577
prefix += separator;

0 commit comments

Comments
 (0)