Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Move cli e2e test to typegate/tests/e2e #492

Merged
merged 7 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions meta-cli/tests/e2e.rs

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions meta-cli/tests/e2e/validator.rs

This file was deleted.

22 changes: 22 additions & 0 deletions typegate/tests/e2e/typegraph/validator_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright Metatype OÜ, licensed under the Elastic License 2.0.
// SPDX-License-Identifier: Elastic-2.0

import { TestModule } from "test-utils/test_module.ts";
import { Meta } from "test-utils/mod.ts";
import { assert } from "std/assert/mod.ts";

const m = new TestModule(import.meta);

Meta.test("typegraph validation", async (t) => {
await t.should(
"fail to serialize typegraph with invalid injection",
async () => {
try {
await m.cli({}, "serialize", "-f", "typegraphs/python/validator.py");
assert(false, "should have thrown");
Natoandro marked this conversation as resolved.
Show resolved Hide resolved
} catch (e) {
await t.assertSnapshot(e.message);
}
},
);
});