mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
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/');
|
|
} |