Skip to content

Commit

Permalink
scripts: test path changed
Browse files Browse the repository at this point in the history
Signed-off-by: jsvisa <[email protected]>
  • Loading branch information
jsvisa committed Oct 17, 2023
1 parent 1cd9d52 commit 59c8b15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/graphql-validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@ diff(schema, schemaStd, [ignoreDirectiveChanges])
})
.catch(console.error);

fs.readdir('graphql/tests', (_, files) => {
fs.readdir('tests/graphql', (_, files) => {
files.forEach((file) => {
if (!fs.lstatSync(`graphql/tests/${file}`).isDirectory()) {
if (!fs.lstatSync(`tests/graphql/${file}`).isDirectory()) {
return;
}

const query = graphql.parse(
fs.readFileSync(`graphql/tests/${file}/request.gql`, 'utf8')
fs.readFileSync(`tests/graphql/${file}/request.gql`, 'utf8')
);
const output = JSON.parse(
fs.readFileSync(`graphql/tests/${file}/response.json`, 'utf8')
fs.readFileSync(`tests/graphql/${file}/response.json`, 'utf8')
);
if (!('statusCode' in output) || !('responses' in output)) {
throw new Error(
Expand Down

0 comments on commit 59c8b15

Please sign in to comment.