Skip to content

Commit

Permalink
only check if getSVGElement is undefined if it's the SVG renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
judocode committed Apr 19, 2024
1 parent ad7193e commit 44f769f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/barline_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { TestOptions, VexFlowTests } from './vexflow_test_helpers';

import { Renderer } from '../src';
import { Barline, BarlineType } from '../src/stavebarline';

const BarlineTests = {
Expand Down Expand Up @@ -44,9 +45,11 @@ function simple(options: TestOptions): void {
f.Formatter().joinVoices([voice]).formatToStave([voice], stave);
f.draw();

notes.forEach((note) => {
options.assert.notEqual(note.getSVGElement(), undefined);
});
if (options.backend === Renderer.Backends.SVG) {
notes.forEach((note) => {
options.assert.notEqual(note.getSVGElement(), undefined);
});
}

options.assert.ok(true, 'Simple Test');
}
Expand Down

0 comments on commit 44f769f

Please sign in to comment.