From 59c8b159d3ed5581ef5182ff16f48c1f9fea9b3d Mon Sep 17 00:00:00 2001 From: jsvisa Date: Tue, 26 Sep 2023 23:14:24 +0800 Subject: [PATCH] scripts: test path changed Signed-off-by: jsvisa --- scripts/graphql-validate.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/graphql-validate.js b/scripts/graphql-validate.js index c1503bcc1..b0da8d716 100644 --- a/scripts/graphql-validate.js +++ b/scripts/graphql-validate.js @@ -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(