(
17 | await fixture(
18 | html``
19 | )
20 | );
21 | });
22 |
23 | it('looks like the latest snapshot', async () => {
24 | await expect(element).shadowDom.to.equalSnapshot();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/protocol104/wizards/__snapshots__/selectDo.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["data model nodes child getter show DO Picker looks like the latest snapshot"] =
5 | `
11 |
12 |
13 |
14 |
15 |
21 |
22 |
28 |
29 |
30 | `;
31 | /* end snapshot data model nodes child getter show DO Picker looks like the latest snapshot */
32 |
33 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/singlelinediagram/wizards/__snapshots__/bay.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["Wizards for SCL element Bay (X/Y) looks like the latest snapshot"] =
5 | `
11 |
12 |
19 |
20 |
26 |
27 |
32 |
33 |
38 |
39 |
40 |
46 |
47 |
53 |
54 |
55 | `;
56 | /* end snapshot Wizards for SCL element Bay (X/Y) looks like the latest snapshot */
57 |
58 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/singlelinediagram/wizards/foundation.test.ts:
--------------------------------------------------------------------------------
1 | import { expect } from '@open-wc/testing';
2 | import {getFixedCoordinateValue} from "../../../../../src/editors/singlelinediagram/wizards/foundation.js";
3 |
4 | describe('Single Line Diagram Wizard foundation', () => {
5 | describe('defines a getFixedCoordinateValue function that', () => {
6 | it("when calling with value null, null will be returned", () => {
7 | expect(getFixedCoordinateValue(null)).to.be.null;
8 | });
9 |
10 | it("when calling with a positive number, number will be returned", () => {
11 | expect(getFixedCoordinateValue("2")).to.be.equal("2");
12 | });
13 |
14 | it("when calling with zero, zero will be returned", () => {
15 | expect(getFixedCoordinateValue("0")).to.be.equal("0");
16 | });
17 |
18 | it("when calling with a negative number, zero will be returned", () => {
19 | expect(getFixedCoordinateValue("-2")).to.be.equal("0");
20 | });
21 |
22 | it("when calling with a invalid number, zero will be returned", () => {
23 | expect(getFixedCoordinateValue("A2")).to.be.equal("0");
24 | });
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/subscription/goose/__snapshots__/subscriber-list.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["subscriber-list-goose initially looks like the latest snapshot"] =
5 | `
6 |
7 | [subscription.goose.publisher.subscriberTitle]
8 |
9 |
10 |
15 |
16 | [subscription.subscriber.noControlBlockSelected]
17 |
18 |
19 |
20 |
21 | `;
22 | /* end snapshot subscriber-list-goose initially looks like the latest snapshot */
23 |
24 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/subscription/goose/subscriber-list.test.ts:
--------------------------------------------------------------------------------
1 | import { html, fixture, expect } from '@open-wc/testing';
2 |
3 | import '../../../../../src/editors/subscription/goose/subscriber-list.js';
4 | import { SubscriberList } from '../../../../../src/editors/subscription/goose/subscriber-list.js';
5 |
6 | describe('subscriber-list-goose', () => {
7 | let element: SubscriberList;
8 | let validSCL: XMLDocument;
9 |
10 | beforeEach(async () => {
11 | validSCL = await fetch('/test/testfiles/valid2007B4.scd')
12 | .then(response => response.text())
13 | .then(str => new DOMParser().parseFromString(str, 'application/xml'));
14 |
15 | element = await fixture(html``);
18 | });
19 |
20 | it('initially looks like the latest snapshot', async () => {
21 | await expect(element).shadowDom.to.equalSnapshot();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/subscription/sampledvalues/__snapshots__/subscriber-list.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["subscriber-list-smv initially looks like the latest snapshot"] =
5 | `
6 |
7 | [subscription.smv.publisher.subscriberTitle]
8 |
9 |
10 |
15 |
16 | [subscription.subscriber.noControlBlockSelected]
17 |
18 |
19 |
20 |
21 | `;
22 | /* end snapshot subscriber-list-smv initially looks like the latest snapshot */
23 |
24 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/subscription/sampledvalues/subscriber-list.test.ts:
--------------------------------------------------------------------------------
1 | import { html, fixture, expect } from '@open-wc/testing';
2 |
3 | import '../../../../../src/editors/subscription/sampledvalues/subscriber-list.js';
4 | import { SubscriberList } from '../../../../../src/editors/subscription/sampledvalues/subscriber-list.js';
5 |
6 | describe('subscriber-list-smv', () => {
7 | let element: SubscriberList;
8 | let validSCL: XMLDocument;
9 |
10 | beforeEach(async () => {
11 | validSCL = await fetch('/test/testfiles/valid2007B4.scd')
12 | .then(response => response.text())
13 | .then(str => new DOMParser().parseFromString(str, 'application/xml'));
14 |
15 | element = await fixture(html``);
18 | });
19 |
20 | it('initially looks like the latest snapshot', async () => {
21 | await expect(element).shadowDom.to.equalSnapshot();
22 | });
23 | });
24 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/substation/__snapshots__/ied-editor.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["A component to visualize SCL element IED looks like the latest snapshot"] =
5 | `
10 |
16 |
17 |
23 |
24 |
30 |
31 |
32 | `;
33 | /* end snapshot A component to visualize SCL element IED looks like the latest snapshot */
34 |
35 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/substation/__snapshots__/l-node-editor.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["web component rendering LNode element as reference to a LN/LN0 within IED looks like the latest snapshot"] =
5 | `
9 |
10 |
11 |
16 |
17 |
22 |
23 |
24 | `;
25 | /* end snapshot web component rendering LNode element as reference to a LN/LN0 within IED looks like the latest snapshot */
26 |
27 | snapshots["web component rendering LNode element as instance of a LNodeType only looks like the latest snapshot"] =
28 | `
34 |
35 |
36 |
41 |
42 |
47 |
48 |
53 |
54 |
55 | `;
56 | /* end snapshot web component rendering LNode element as instance of a LNodeType only looks like the latest snapshot */
57 |
58 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/substation/general-equipment-editor.test.ts:
--------------------------------------------------------------------------------
1 | import { expect, fixture, html } from '@open-wc/testing';
2 |
3 | import '../../../../src/editors/substation/general-equipment-editor.js';
4 | import { GeneralEquipmentEditor } from '../../../../src/editors/substation/general-equipment-editor.js';
5 |
6 | describe('Editor web component for GeneralEquipment SCL element', () => {
7 | let element: GeneralEquipmentEditor;
8 | let doc: XMLDocument;
9 |
10 | beforeEach(async () => {
11 | doc = await fetch('/test/testfiles/editors/substation/generalequipment.scd')
12 | .then(response => response.text())
13 | .then(str => new DOMParser().parseFromString(str, 'application/xml'));
14 |
15 | const generalEquipment = doc.querySelector('GeneralEquipment');
16 | element = await fixture(
17 | html``
21 | );
22 | });
23 |
24 | describe('rendered as action icon', () => {
25 | beforeEach(async () => {
26 | element.showfunctions = false;
27 | await element.updateComplete;
28 | });
29 |
30 | it('looks like the latest snapshot', async () =>
31 | await expect(element).shadowDom.to.equalSnapshot());
32 | });
33 |
34 | describe('rendered as action pane', () => {
35 | beforeEach(async () => {
36 | element.showfunctions = true;
37 | await element.updateComplete;
38 | });
39 |
40 | it('look like the latest snapshot', async () =>
41 | await expect(element).shadowDom.to.equalSnapshot());
42 | });
43 | });
44 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/editors/substation/lnodewizard.test.ts:
--------------------------------------------------------------------------------
1 | import { expect } from '@open-wc/testing';
2 |
3 | import { getLNode } from '../../../../src/wizards/lnode.js';
4 |
5 | describe('lnodewizard', () => {
6 | describe('defines a getLNode function that', () => {
7 | let doc: Document;
8 | beforeEach(async () => {
9 | doc = await fetch('/test/testfiles/lnodewizard.scd')
10 | .then(response => response.text())
11 | .then(str => new DOMParser().parseFromString(str, 'application/xml'));
12 | });
13 |
14 | it('returns LNode on existing lnode references in the parent element', () => {
15 | expect(
16 | getLNode(
17 | doc.querySelector('Bay[name="COUPLING_BAY"]')!,
18 | doc.querySelector(
19 | 'IED[name="IED2"] LDevice[inst="CBSW"] > LN[lnClass="XSWI"][inst="3"]'
20 | )!
21 | )
22 | ).to.not.be.null;
23 | });
24 |
25 | it('returns LNode with missing or empty prefix in LN', () => {
26 | expect(
27 | getLNode(
28 | doc.querySelector('Bay[name="COUPLING_BAY"]')!,
29 | doc.querySelector(
30 | 'IED[name="IED2"] LDevice[inst="CBSW"] > LN[lnClass="LPHD"][inst="1"]'
31 | )!
32 | )
33 | ).to.not.be.null;
34 | });
35 |
36 | it('returns LNode with missing or empty prefix and missing or empty inst in LN0', () => {
37 | expect(
38 | getLNode(
39 | doc.querySelector('Bay[name="COUPLING_BAY"]')!,
40 | doc.querySelector('IED[name="IED2"] LDevice[inst="CBSW"] > LN0')!
41 | )
42 | ).to.not.be.null;
43 | });
44 | });
45 | });
46 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/menu/virtualtemplateied/__snapshots__/foundation.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["foundation for virtual IED creation getSpecificationIED function looks like the latest snapshot"] =
5 | `
9 |
10 |
11 |
12 |
13 |
14 |
19 |
20 |
26 |
27 |
28 |
29 |
34 |
35 |
41 |
42 |
43 |
44 |
45 |
46 | `;
47 | /* end snapshot foundation for virtual IED creation getSpecificationIED function looks like the latest snapshot */
48 |
49 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/validators/templates/foundation.test.ts:
--------------------------------------------------------------------------------
1 | import { expect } from '@open-wc/testing';
2 |
3 | import {
4 | tagValidator,
5 | validateChildren,
6 | } from '../../../../src/validators/templates/foundation.js';
7 |
8 | describe('validator foundation', () => {
9 | describe('tagValidator', () => {
10 | it('tagValidator returns undefined with missing tagName', () => {
11 | expect(tagValidator['noTag']).to.be.undefined;
12 | });
13 | });
14 | describe('validateChildren', () => {
15 | let element: Element;
16 | beforeEach(() => {
17 | element = new DOMParser().parseFromString(
18 | '',
19 | 'application/xml'
20 | ).documentElement;
21 | });
22 | it('does not throw Issues for unknown childTags', async () => {
23 | const issues = await validateChildren(element);
24 | expect(issues.length).to.equal(0);
25 | });
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/__snapshots__/address.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["address renderGseSmvAddress looks like the latest snapshot"] =
5 | `
11 |
12 |
13 |
14 |
15 |
16 |
21 |
22 |
27 |
28 |
35 |
36 |
42 |
43 |
44 |
50 |
51 |
52 | `;
53 | /* end snapshot address renderGseSmvAddress looks like the latest snapshot */
54 |
55 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/__snapshots__/connectivitynode.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["Wizards for SCL element ConnectivityNode looks like the latest snapshot"] =
5 | `
11 |
12 |
20 |
21 |
28 |
29 |
30 |
36 |
37 |
38 | `;
39 | /* end snapshot Wizards for SCL element ConnectivityNode looks like the latest snapshot */
40 |
41 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/__snapshots__/fcda.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["create wizard for FCDA element with a valid SCL file looks like the last snapshot"] =
5 | `
11 |
12 |
13 |
14 |
15 |
21 |
22 |
28 |
29 |
30 | `;
31 | /* end snapshot create wizard for FCDA element with a valid SCL file looks like the last snapshot */
32 |
33 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/__snapshots__/ldevice.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["Wizards for SCL element LDevice Allowing/Disallowing ldName editing looks like the latest snapshot"] =
5 | `
11 |
12 |
19 |
20 |
27 |
28 |
33 |
34 |
35 |
41 |
42 |
48 |
49 |
50 | `;
51 | /* end snapshot Wizards for SCL element LDevice Allowing/Disallowing ldName editing looks like the latest snapshot */
52 |
53 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/__snapshots__/terminal.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["Wizards for SCL element Terminal looks like the latest snapshot"] =
5 | `
11 |
12 |
20 |
21 |
28 |
29 |
36 |
37 |
38 |
44 |
45 |
46 | `;
47 | /* end snapshot Wizards for SCL element Terminal looks like the latest snapshot */
48 |
49 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/__snapshots__/trgops.test.snap.js:
--------------------------------------------------------------------------------
1 | /* @web/test-runner snapshot v1 */
2 | export const snapshots = {};
3 |
4 | snapshots["Wizards for SCL TrgOps element define an edit wizard that looks like the latest snapshot"] =
5 | `
11 |
12 |
17 |
18 |
23 |
24 |
29 |
30 |
35 |
36 |
41 |
42 |
43 |
49 |
50 |
56 |
57 |
58 | `;
59 | /* end snapshot Wizards for SCL TrgOps element define an edit wizard that looks like the latest snapshot */
60 |
61 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/connectivitynode.test.ts:
--------------------------------------------------------------------------------
1 | import { expect, fixture, html } from '@open-wc/testing';
2 |
3 | import '@openscd/open-scd/src/addons/Wizards.js';
4 | import { OscdWizards } from '@openscd/open-scd/src/addons/Wizards.js';
5 |
6 | import { editConnectivityNodeWizard } from '../../../src/wizards/connectivitynode.js';
7 |
8 | describe('Wizards for SCL element ConnectivityNode', () => {
9 | let doc: XMLDocument;
10 | let element: OscdWizards;
11 |
12 | beforeEach(async () => {
13 | element = await fixture(
14 | html``
15 | );
16 | doc = await fetch('/test/testfiles/valid2007B4withSubstationXY.scd')
17 | .then(response => response.text())
18 | .then(str => new DOMParser().parseFromString(str, 'application/xml'));
19 |
20 | const wizard = editConnectivityNodeWizard(
21 | doc.querySelector('ConnectivityNode')!
22 | );
23 | element.workflow.push(() => wizard);
24 | await element.requestUpdate();
25 | });
26 | it('looks like the latest snapshot', async () => {
27 | await expect(element.wizardUI.dialog).dom.to.equalSnapshot();
28 | });
29 | });
30 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/services.test.ts:
--------------------------------------------------------------------------------
1 | import { expect } from '@open-wc/testing';
2 |
3 | import { isEmptyObject } from '../../../src/wizards/services.js';
4 |
5 | describe('Wizards for SCL element Services', () => {
6 | it('Simple empty input object is empty', () => {
7 | const sut = {
8 | foo: '',
9 | };
10 |
11 | expect(isEmptyObject(sut)).to.be.true;
12 | });
13 | it('Complex empty input object is empty', () => {
14 | const sut = {
15 | foo: {
16 | bar: '',
17 | },
18 | };
19 | expect(isEmptyObject(sut)).to.be.true;
20 | });
21 | it('Simple filled input object is not empty', () => {
22 | const sut = {
23 | foo: 'bar',
24 | };
25 | expect(isEmptyObject(sut)).to.be.false;
26 | });
27 | it('Complex filled input object is not empty', () => {
28 | const sut = {
29 | foo: {
30 | bar: 'qux',
31 | },
32 | };
33 | expect(isEmptyObject(sut)).to.be.false;
34 | });
35 | });
36 |
--------------------------------------------------------------------------------
/packages/plugins/test/unit/wizards/terminal.test.ts:
--------------------------------------------------------------------------------
1 | import { expect, fixture, html } from '@open-wc/testing';
2 |
3 | import '@openscd/open-scd/src/addons/Wizards.js';
4 | import { OscdWizards } from '@openscd/open-scd/src/addons/Wizards.js';
5 |
6 | import { editTerminalWizard } from '../../../src/wizards/terminal.js';
7 |
8 | describe('Wizards for SCL element Terminal', () => {
9 | let doc: XMLDocument;
10 | let element: OscdWizards;
11 |
12 | beforeEach(async () => {
13 | element = await fixture(
14 | html``
15 | );
16 | doc = await fetch('/test/testfiles/valid2007B4withSubstationXY.scd')
17 | .then(response => response.text())
18 | .then(str => new DOMParser().parseFromString(str, 'application/xml'));
19 |
20 | const wizard = editTerminalWizard(doc.querySelector('Terminal')!);
21 | element.workflow.push(() => wizard);
22 | await element.requestUpdate();
23 | });
24 | it('looks like the latest snapshot', async () => {
25 | await expect(element.wizardUI.dialog).dom.to.equalSnapshot();
26 | });
27 | });
28 |
--------------------------------------------------------------------------------
/packages/plugins/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2020",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "noEmitOnError": true,
7 | "lib": ["es2020", "dom"],
8 | "strict": true,
9 | "esModuleInterop": false,
10 | "allowSyntheticDefaultImports": true,
11 | "experimentalDecorators": true,
12 | "importHelpers": true,
13 | "allowJs": true,
14 | "skipLibCheck": true,
15 | "outDir": "dist",
16 | "sourceMap": true,
17 | "inlineSources": true,
18 | "resolveJsonModule": true,
19 | "rootDir": "./src"
20 | },
21 | "include": ["src/**/*.ts"]
22 | }
23 |
--------------------------------------------------------------------------------
/packages/plugins/workbox-config.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | globDirectory: 'build/',
3 | globPatterns: [
4 | 'public/**/*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}',
5 | 'src/**/*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}',
6 | '*.{md,js,png,xml,pdf,css,html,info,json,ico,svg,wasm}',
7 | ],
8 | swDest: 'build/sw.js',
9 | runtimeCaching: [
10 | {
11 | urlPattern: /.*/,
12 | handler: 'NetworkFirst',
13 | },
14 | ],
15 | skipWaiting: true,
16 | inlineWorkboxRuntime: true,
17 | };
18 |
--------------------------------------------------------------------------------
/packages/wizards/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@openscd/wizards",
3 | "$schema": "../../node_modules/nx/schemas/project-schema.json",
4 | "projectType": "library",
5 | "sourceRoot": "packages/wizards/src",
6 | "targets": {}
7 | }
8 |
--------------------------------------------------------------------------------
/packages/xml/.gitignore:
--------------------------------------------------------------------------------
1 | .tsbuildinfo
2 |
3 | dist/
4 | node_modules/
5 | doc/
6 | coverage/
7 |
--------------------------------------------------------------------------------
/packages/xml/.npmignore:
--------------------------------------------------------------------------------
1 | ## editors
2 | /.idea
3 | /.vscode
4 |
5 | ## system files
6 | .DS_Store
7 |
8 | ## npm
9 | /node_modules/
10 | /npm-debug.log
11 |
12 | ## testing
13 | /coverage/
14 |
15 | ## local debug
16 | /.npmrc
17 |
18 | ## temp folders
19 | /.tmp/
20 |
21 | # build
22 | /_site/
23 | /out-tsc/
24 |
25 | storybook-static
26 | custom-elements.json
27 |
--------------------------------------------------------------------------------
/packages/xml/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
--------------------------------------------------------------------------------
/packages/xml/README.md:
--------------------------------------------------------------------------------
1 | # OpenSCD XML
2 |
--------------------------------------------------------------------------------
/packages/xml/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@openscd/xml",
3 | "$schema": "../../node_modules/nx/schemas/project-schema.json",
4 | "projectType": "library",
5 | "sourceRoot": "packages/xml/src",
6 | "targets": {}
7 | }
8 |
--------------------------------------------------------------------------------
/packages/xml/src/index.ts:
--------------------------------------------------------------------------------
1 | export { createElement, cloneElement, getUniqueElementName, getChildElementsByTagName, formatXml } from './foundation.js';
2 |
--------------------------------------------------------------------------------
/packages/xml/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "noEmitOnError": true,
7 | "lib": ["es2018", "dom"],
8 | "strict": true,
9 | "esModuleInterop": false,
10 | "allowSyntheticDefaultImports": true,
11 | "experimentalDecorators": true,
12 | "declaration": true,
13 | "importHelpers": true,
14 | "outDir": "./dist",
15 | "sourceMap": true,
16 | "inlineSources": true,
17 | "rootDir": "./src",
18 | "tsBuildInfoFile": ".tsbuildinfo",
19 | "incremental": true,
20 | "skipLibCheck": true
21 | },
22 | "include": ["src/**/*.ts"]
23 | }
24 |
--------------------------------------------------------------------------------
/packages/xml/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "rootDir": "./"
5 | },
6 | "files": [
7 | "./**/*.ts"
8 | ]
9 | }
--------------------------------------------------------------------------------
/packages/xml/web-test-runner.config.mjs:
--------------------------------------------------------------------------------
1 | // import { playwrightLauncher } from '@web/test-runner-playwright';
2 | import { esbuildPlugin } from '@web/dev-server-esbuild';
3 |
4 | export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
5 | /** we run test directly on TypeScript files */
6 | plugins: [esbuildPlugin({ ts: true })],
7 |
8 | /** Resolve bare module imports */
9 | nodeResolve: true,
10 |
11 | /** filter browser logs
12 | * Plugins have a fix URL and do not fit to the file structure in test environment.
13 | * Creating open-scd in the tests leads to error in the browser log - we had to disable the browser log
14 | */
15 | browserLogs: false,
16 |
17 | /** specify groups for unit and integrations tests
18 | * hint: no --group definition runs all groups
19 | */
20 | groups: [
21 | {
22 | name: 'unit',
23 | files: 'test/**/*.test.ts',
24 | },
25 | ],
26 | });
27 |
--------------------------------------------------------------------------------