diff --git a/packages/load/tests/loaders/schema/schema-from-export.spec.ts b/packages/load/tests/loaders/schema/schema-from-export.spec.ts index 9335c8ae664..88d64bd273c 100644 --- a/packages/load/tests/loaders/schema/schema-from-export.spec.ts +++ b/packages/load/tests/loaders/schema/schema-from-export.spec.ts @@ -21,16 +21,24 @@ describe('Schema From Export', () => { sync: loadSchemaSync, })((load, mode) => { test('should load the schema correctly from module.exports', async () => { - const result = await load('./tests/loaders/schema/test-files/loaders/module-exports.js', { - loaders: [new CodeFileLoader()], - }); + const result = await load( + '../../../../loaders/code-file/tests/test-files/loaders/module-exports.js', + { + loaders: [new CodeFileLoader()], + cwd: __dirname, + }, + ); expect(isSchema(result)).toBeTruthy(); }); test('should load the schema (with extend) correctly from module.exports', async () => { - const result = await load('./tests/loaders/schema/test-files/schema-dir/with-extend.js', { - loaders: [new CodeFileLoader()], - }); + const result = await load( + '../../../../loaders/code-file/tests/test-files/loaders/with-extend.js', + { + loaders: [new CodeFileLoader()], + cwd: __dirname, + }, + ); expect(isSchema(result)).toBeTruthy(); const QueryType = result.getQueryType(); assertNonMaybe(QueryType); @@ -38,36 +46,52 @@ describe('Schema From Export', () => { }); test('should load the schema correctly from variable export', async () => { - const result = await load('./tests/loaders/schema/test-files/loaders/schema-export.js', { - loaders: [new CodeFileLoader()], - }); + const result = await load( + '../../../../loaders/code-file/tests/test-files/loaders/schema-export.js', + { + loaders: [new CodeFileLoader()], + cwd: __dirname, + }, + ); expect(isSchema(result)).toBeTruthy(); }); test('should load the schema correctly from default export', async () => { - const result = await load('./tests/loaders/schema/test-files/loaders/default-export.js', { - loaders: [new CodeFileLoader()], - }); + const result = await load( + '../../../../loaders/code-file/tests/test-files/loaders/default-export.js', + { + loaders: [new CodeFileLoader()], + cwd: __dirname, + }, + ); expect(isSchema(result)).toBeTruthy(); }); if (mode === 'async') { test('should load the schema correctly from promise export', async () => { - const result = await load('./tests/loaders/schema/test-files/loaders/promise-export.js', { - loaders: [new CodeFileLoader()], - }); + const result = await load( + '../../../../loaders/code-file/tests/test-files/loaders/promise-export.js', + { + loaders: [new CodeFileLoader()], + cwd: __dirname, + }, + ); expect(isSchema(result)).toBeTruthy(); }); test('should load the schema correctly from promise export', async () => { - const result = await load('./tests/loaders/schema/test-files/loaders/promise-export.js', { - loaders: [new CodeFileLoader()], - }); + const result = await load( + '../../../../loaders/code-file/tests/test-files/loaders/promise-export.js', + { + loaders: [new CodeFileLoader()], + cwd: __dirname, + }, + ); expect(isSchema(result)).toBeTruthy(); }); } - test.only('should work with extensions (without schema definition)', async () => { + test('should work with extensions (without schema definition)', async () => { const schemaPath = './tests/loaders/schema/test-files/schema-dir/extensions/export-schema.js'; const schema = await load(schemaPath, { loaders: [new CodeFileLoader()], @@ -80,7 +104,7 @@ describe('Schema From Export', () => { expect(queryFields).toContain('bar'); }); - test.only('should work with extensions (with schema definition)', async () => { + test('should work with extensions (with schema definition)', async () => { const schemaPath = './tests/loaders/schema/test-files/schema-dir/extensions/export-schema-with-def.js'; const schema = await load(schemaPath, {