summaryrefslogtreecommitdiffhomepage
path: root/test/runtimes/nodejs
diff options
context:
space:
mode:
Diffstat (limited to 'test/runtimes/nodejs')
-rw-r--r--test/runtimes/nodejs/proctor-nodejs.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/test/runtimes/nodejs/proctor-nodejs.go b/test/runtimes/nodejs/proctor-nodejs.go
index 0885516e9..5f21e046b 100644
--- a/test/runtimes/nodejs/proctor-nodejs.go
+++ b/test/runtimes/nodejs/proctor-nodejs.go
@@ -42,27 +42,10 @@ func main() {
}
func (n nodejsRunner) ListTests() ([]string, error) {
- var testSlice []string
-
- err := filepath.Walk(testDir, func(path string, info os.FileInfo, err error) error {
- name := filepath.Base(path)
-
- if info.IsDir() || !testRegEx.MatchString(name) {
- return nil
- }
-
- relPath, err := filepath.Rel(testDir, path)
- if err != nil {
- return err
- }
- testSlice = append(testSlice, relPath)
- return nil
- })
-
+ testSlice, err := common.Search(testDir, testRegEx)
if err != nil {
- return nil, fmt.Errorf("walking %q: %v", testDir, err)
+ return nil, err
}
-
return testSlice, nil
}