import { expect, tap } from '@push.rocks/tapbundle'; import * as smartxml from '../ts/index.js'; let testSmartxml: smartxml.SmartXml; let testXml = ` nice `; tap.test('should create an instance', async () => { testSmartxml = new smartxml.SmartXml(); }); tap.test('should create an xml string', async () => { const xmlResult = testSmartxml.createXmlFromObject({ hello: { "@_xlmns:teststring": "hellothere", "@_xlmns:testnumber": 10, wow: 'test', url: [{loc: 3},{loc: 3}] } }); console.log(xmlResult); }); tap.test('should parse an yml file', async () => { const jsObject = testSmartxml.parseXmlToObject(testXml); console.log(jsObject); expect(typeof jsObject).toEqual('object'); expect(jsObject).property('hello').property('wow').toEqual('nice'); }); tap.start();