UNPKG

graphqldoc

Version:
24 lines (23 loc) 1.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const introspectionParser_1 = require("../../lib/schema-loader/introspectionParser"); const navigation_directive_1 = require("../navigation.directive"); const introspection = require('./empty.schema.json'); const projectPackage = require('./projectPackage.json'); describe('pĺugins/navigation.directive#NavigationDirectives', () => { const plugin = new navigation_directive_1.default(introspectionParser_1.getSchemaFromIntrospection(introspection), projectPackage, {}); test('plugin return navigation', () => { const navigations = plugin.getNavigations('Query'); expect(navigations).toBeInstanceOf(Array); expect(navigations).toEqual([ { title: 'Directives', items: [ { text: 'deprecated', href: '/deprecated.doc.html', isActive: false }, { text: 'include', href: '/include.doc.html', isActive: false }, { text: 'skip', href: '/skip.doc.html', isActive: false }, ] } ]); }); });