UNPKG

graphql-typed-client

Version:

A tool that generates a strongly typed client library for any GraphQL endpoint. The client allows writing GraphQL queries as plain JS objects (with type safety, awesome code completion experience, custom scalar type mapping, type guards and more)

17 lines 691 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var prettify_1 = require("../../helpers/prettify"); var RenderContext_1 = require("./RenderContext"); describe('RenderContext', function () { test('prettify', function () { var ctx = new RenderContext_1.RenderContext(); ctx.addCodeBlock('interface A{}'); expect(ctx.toCode('typescript')).toBe(prettify_1.prettify("interface A{}", 'typescript')); }); test('raw', function () { var ctx = new RenderContext_1.RenderContext(); ctx.addCodeBlock('raw string'); expect(ctx.toCode()).toBe('raw string'); }); }); //# sourceMappingURL=RenderContext.test.js.map