Skip to content

Commit

Permalink
Add dummy instance test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dartoxian committed Oct 20, 2023
1 parent abaa650 commit 3c7f83c
Show file tree
Hide file tree
Showing 4 changed files with 2,948 additions and 25 deletions.
1 change: 1 addition & 0 deletions enclave-manager/api/typescript/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {presets: ['@babel/preset-env']}
10 changes: 7 additions & 3 deletions enclave-manager/api/typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"version": "0.0.0",
"name": "enclave-manager-sdk",
"type": "module",
"main": "./build/index",
"description": "This repo contains a Typescript client for communicating with the Enclave Manager API server.",
"types": "./build/index",
"scripts": {
"clean": "rm -rf build",
"build": "tsc",
"postbuild": "cp -R ../../../api/typescript/src/core/kurtosis_core_rpc_api_bindings/connect/* ./build && cp -R ../../../api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/connect/* ./build/",
"test": "echo 'The Enclave Manager Typescript API does not have any tests.'"
"test": "jest"
},
"files": [
"build"
Expand Down Expand Up @@ -36,10 +37,13 @@
"@bufbuild/protobuf": "^1.3.3"
},
"devDependencies": {
"typescript": "^4.3.5",
"@babel/preset-env": "^7.23.2",
"@bufbuild/protoc-gen-es": "^1.3.3",
"@connectrpc/connect": "^0.13.0",
"@connectrpc/connect-web": "^0.13.0",
"@connectrpc/protoc-gen-connect-es": "^0.13.0"
"@connectrpc/protoc-gen-connect-es": "^0.13.0",
"@types/jest": "^29.5.6",
"jest": "^29.7.0",
"typescript": "^4.3.5"
}
}
11 changes: 11 additions & 0 deletions enclave-manager/api/typescript/src/__tests__/api_test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { createConnectTransport } from "@connectrpc/connect-web";
import { createPromiseClient } from "@connectrpc/connect";
import { KurtosisEnclaveManagerServer } from "../../build/kurtosis_enclave_manager_api_connect.js";

describe("Enclave manager SDK", () => {
it("Should be able to be instantiated", () => {
const transport = createConnectTransport({baseUrl: "someUrl"});
const client = createPromiseClient(KurtosisEnclaveManagerServer, transport);
expect(client).toBeDefined();
})
})
Loading

0 comments on commit 3c7f83c

Please sign in to comment.