Skip to content

Commit

Permalink
tc39/test262: Enable some parallel execution
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Dec 1, 2020
1 parent a74227a commit c5ab1f0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions js/tc39/tc39_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,17 @@ func (ctx *tc39TestCtx) runTC39Tests(name string) {
if file.Name()[0] == '.' {
continue
}
newName := path.Join(name, file.Name())
if file.IsDir() {
ctx.runTC39Tests(path.Join(name, file.Name()))
if strings.Count(newName, "/") == 1 {
ctx.t.Run(newName, func(t *testing.T) {
t.Parallel()
ctx.runTC39Tests(newName)
})
} else {
ctx.runTC39Tests(newName)
}
} else if strings.HasSuffix(file.Name(), ".js") && !strings.HasSuffix(file.Name(), "_FIXTURE.js") {
newName := path.Join(name, file.Name())
ctx.runTest(newName, func(t *testing.T) {
ctx.runTC39File(newName, t)
})
Expand Down

0 comments on commit c5ab1f0

Please sign in to comment.