forked from OpenEnergyTools/scl-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoscd-editor-template.spec.ts
More file actions
35 lines (29 loc) · 965 Bytes
/
oscd-editor-template.spec.ts
File metadata and controls
35 lines (29 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* eslint-disable @typescript-eslint/no-unused-expressions */
import { expect, fixture, html } from '@open-wc/testing';
import OscdEditorTemplate from './oscd-editor-template.js';
customElements.define('oscd-editor-template', OscdEditorTemplate);
const sclXmlDocString = `
<?xml version="1.0" encoding="UTF-8"?>
<SCL version="2007" revision="B" xmlns="http://www.iec.ch/61850/2003/SCL">
<Substation ens1:foo="a" name="A1" desc="test substation">
</Substation>
</SCL>
`;
const sclDoc = new DOMParser().parseFromString(
sclXmlDocString,
'application/xml',
);
describe('oscd-editor-template', () => {
let plugin: OscdEditorTemplate;
beforeEach(async () => {
plugin = await fixture(html`<oscd-editor-template></oscd-editor-template>`);
plugin.doc = sclDoc;
plugin.docName = 'test.scd';
});
afterEach(() => {
plugin.remove();
});
it('dummy test', async () => {
expect(plugin).to.be.ok;
});
});