You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of #44 , I tried adding test cases to the PR, but they kept failing, and I think it is related to #24 .
Details
Would like to add a test case though to ensure this works as expected ASAP. Here is what I had originally - #44
Make sure to install node-fetch as a devDependency
// ./components/events-list.jsimportfetchfrom'node-fetch';classEventsListextendsHTMLElement{asyncconnectedCallback(){if(!this.shadowRoot){// TODO should probably try and make this a JSON fileconstevents=awaitfetch('http://www.analogstudios.net/api/v2/events').then(resp=>resp.json());this.attachShadow({mode: 'open'});this.shadowRoot.innerHTML=`<h1>Events List (${events.length})</h1>`;}}}export{EventsList};customElements.define('wc-events-list',EventsList);
// node-modules.spec.js/* * Use Case * Run wcc against a custom element using a dependency from node-modules * * User Result * Should run without error. * * User Workspace * src/ * components/ * events-list.js * index.js */import{renderToString}from'../../../src/wcc.js';describe('Run WCC For ',function(){constLABEL='Custom Element w/ a node modules dependency';describe(LABEL,function(){it('should not fail when the content load a node module',function(){Promise.resolve(renderToString(newURL('./src/index.js',import.meta.url)));});});});
The text was updated successfully, but these errors were encountered:
Type of Change
Summary
As part of #44 , I tried adding test cases to the PR, but they kept failing, and I think it is related to #24 .
Details
Would like to add a test case though to ensure this works as expected ASAP. Here is what I had originally - #44
The text was updated successfully, but these errors were encountered: