mirror of
https://github.com/BradNut/graphbrainz
synced 2025-09-08 17:40:32 +00:00
* wip: Modernize dependencies, syntax, imports * Use final release of ava-nock v2 * Update Travis config * Remove Node 13 from test matrix * Replace errorClass with parseErrorMessage in subclasses * define exports, apply updated lint rules * Remove markdown eslint plugin * Update README * v9.0.0-beta.1 * Add gql tag to exports * v9.0.0-beta.2 * Bump ava-nock, add test * Update dataloader loadMany usage * Add modules note to README * Add retry option to got calls
15 lines
474 B
JavaScript
15 lines
474 B
JavaScript
import test from 'ava';
|
|
import { Node } from '../../src/types/node.js';
|
|
import { ReleaseGroup } from '../../src/types/release-group.js';
|
|
import { baseSchema as schema } from '../../src/schema.js';
|
|
|
|
test('loads types from their module', (t) => {
|
|
t.is(
|
|
Node.resolveType({ _type: 'release-group' }, {}, { schema }),
|
|
ReleaseGroup
|
|
);
|
|
});
|
|
|
|
test('returns undefined for unknown types', (t) => {
|
|
t.is(Node.resolveType({ _type: 'foo' }, {}, { schema }), undefined);
|
|
});
|