Skip to content

Commit 3f3ccb2

Browse files
committed
fix: restore hand-written visitor_test.rs (uses two transform functions)
1 parent 02f26f6 commit 3f3ccb2

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

compiler/crates/graphql-syntax/tests/visitor_test.rs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<237cc24056133ee6aec1c8d323c7fca2>>
7+
* @generated SignedSource<<0000000000000000000000000000000000>>
88
*/
99

1010
mod visitor;
1111

1212
use visitor::transform_fixture;
13+
use visitor::transform_schema_fixture;
1314
use fixture_tests::test_fixture;
1415

16+
// Executable document tests
17+
1518
#[tokio::test]
1619
async fn kitchen_sink() {
1720
let input = include_str!("visitor/fixtures/kitchen_sink.graphql");
@@ -27,29 +30,31 @@ async fn nested_fragments() {
2730
}
2831

2932
#[tokio::test]
30-
async fn schema_extensions() {
31-
let input = include_str!("visitor/fixtures/schema_extensions.graphql");
32-
let expected = include_str!("visitor/fixtures/schema_extensions.expected");
33-
test_fixture(transform_fixture, file!(), "schema_extensions.graphql", "visitor/fixtures/schema_extensions.expected", input, expected).await;
33+
async fn variable_definitions() {
34+
let input = include_str!("visitor/fixtures/variable_definitions.graphql");
35+
let expected = include_str!("visitor/fixtures/variable_definitions.expected");
36+
test_fixture(transform_fixture, file!(), "variable_definitions.graphql", "visitor/fixtures/variable_definitions.expected", input, expected).await;
3437
}
3538

39+
// Schema document tests
40+
3641
#[tokio::test]
3742
async fn schema_kitchen_sink() {
3843
let input = include_str!("visitor/fixtures/schema_kitchen_sink.graphql");
3944
let expected = include_str!("visitor/fixtures/schema_kitchen_sink.expected");
40-
test_fixture(transform_fixture, file!(), "schema_kitchen_sink.graphql", "visitor/fixtures/schema_kitchen_sink.expected", input, expected).await;
45+
test_fixture(transform_schema_fixture, file!(), "schema_kitchen_sink.graphql", "visitor/fixtures/schema_kitchen_sink.expected", input, expected).await;
4146
}
4247

4348
#[tokio::test]
4449
async fn schema_with_directives() {
4550
let input = include_str!("visitor/fixtures/schema_with_directives.graphql");
4651
let expected = include_str!("visitor/fixtures/schema_with_directives.expected");
47-
test_fixture(transform_fixture, file!(), "schema_with_directives.graphql", "visitor/fixtures/schema_with_directives.expected", input, expected).await;
52+
test_fixture(transform_schema_fixture, file!(), "schema_with_directives.graphql", "visitor/fixtures/schema_with_directives.expected", input, expected).await;
4853
}
4954

5055
#[tokio::test]
51-
async fn variable_definitions() {
52-
let input = include_str!("visitor/fixtures/variable_definitions.graphql");
53-
let expected = include_str!("visitor/fixtures/variable_definitions.expected");
54-
test_fixture(transform_fixture, file!(), "variable_definitions.graphql", "visitor/fixtures/variable_definitions.expected", input, expected).await;
56+
async fn schema_extensions() {
57+
let input = include_str!("visitor/fixtures/schema_extensions.graphql");
58+
let expected = include_str!("visitor/fixtures/schema_extensions.expected");
59+
test_fixture(transform_schema_fixture, file!(), "schema_extensions.graphql", "visitor/fixtures/schema_extensions.expected", input, expected).await;
5560
}

0 commit comments

Comments
 (0)