Skip to content

Commit 93be655

Browse files
committed
initial set - up
1 parent cd30e40 commit 93be655

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

lol.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,31 @@ var mocha = new Mocha();
1010
const itSpecNameRegex = /(?<=it\(')(\d|\w|\s)+/ig
1111

1212

13+
const filesWithGrepOpts = []
14+
15+
1316

1417
var testDir = path.relative(__dirname, './mocha_specs')
1518

1619
// Add each .js file to the mocha instance
17-
getSpecFilesArr(testDir)
20+
getSpecFilesArr(testDir).forEach(function(file) {
21+
22+
const fileContent = fs.readFileSync(file, {encoding: 'utf8'})
1823

24+
const stepGreps = fileContent.match(itSpecNameRegex)
1925

20-
.forEach(function(file) {
2126

22-
const fileContent = fs.readFileSync(file, {encoding: 'utf8'})
27+
stepGreps.forEach(function(grepItem) {
28+
filesWithGrepOpts.push({file, grepItem})
29+
})
2330

24-
console.log(fileContent.match(itSpecNameRegex))
31+
// mocha.addFile(
32+
// path.join(testDir, file)
33+
// );
34+
});
2535

26-
// mocha.addFile(
27-
// path.join(testDir, file)
28-
// );
29-
});
3036

37+
console.log(filesWithGrepOpts)
3138

3239

3340

0 commit comments

Comments
 (0)