@wolox/graphql-inspector-node
Version:
## Summary Simple schema inspector that uses `graphql-inspector` for comparing schemas looking for differences between them and categorizing them into three possible categories: * NON_BREAKING * DANGEROUS * BREAKING
20 lines (16 loc) • 508 B
JavaScript
/* eslint-disable global-require */
;
const fs = require('fs');
const path = require('path');
// including all test files
const normalizedPath = path.join(__dirname, '.');
const requireAllTestFiles = pathToSearch => {
fs.readdirSync(pathToSearch).forEach(file => {
if (fs.lstatSync(`${pathToSearch}/${file}`).isDirectory()) {
requireAllTestFiles(`${pathToSearch}/${file}`);
} else {
require(`${pathToSearch}/${file}`);
}
});
};
requireAllTestFiles(normalizedPath);