13 lines
376 B
JavaScript
13 lines
376 B
JavaScript
|
const { lstatSync, readdirSync } = require('fs')
|
||
|
const { join } = require('path')
|
||
|
|
||
|
const isDirectory = source => lstatSync(source).isDirectory()
|
||
|
const getDirectories = source =>
|
||
|
readdirSync(source)
|
||
|
.map(name => join(source, name))
|
||
|
.filter(isDirectory)
|
||
|
.map(x => x.split('/').slice(-1)[0])
|
||
|
|
||
|
module.exports = function() {
|
||
|
return getDirectories('test/suites/');
|
||
|
}
|