mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-12 11:17:01 +00:00
18 lines
605 B
TypeScript
18 lines
605 B
TypeScript
![]() |
import { module, test } from 'qunit';
|
||
|
import { setupTest } from 'ember-qunit';
|
||
|
import GraphRenderer from '@datahub/shared/services/graph-renderer';
|
||
|
import { simpleGraph } from '../../../../tests/helpers/graph/graphs';
|
||
|
|
||
|
module('Unit | Service | graph-renderer', function(hooks): void {
|
||
|
setupTest(hooks);
|
||
|
|
||
|
test('it exists', async function(assert): Promise<void> {
|
||
|
const service: GraphRenderer = this.owner.lookup('service:graph-renderer');
|
||
|
assert.ok(service);
|
||
|
|
||
|
const svgString = await service.render(simpleGraph);
|
||
|
|
||
|
assert.ok(svgString.indexOf('<svg') >= 0, 'has svg element');
|
||
|
});
|
||
|
});
|