From adaa8255ebed75f2dce6061ebdba22b574a6384f Mon Sep 17 00:00:00 2001 From: "hritik.seth" Date: Wed, 16 Apr 2025 18:14:01 +0530 Subject: [PATCH] its a first component --- .../__tests__/firstComponent.test.js | 25 +++++++++++++++++++ .../lwc/firstComponent/firstComponent.html | 3 +++ .../lwc/firstComponent/firstComponent.js | 3 +++ .../firstComponent/firstComponent.js-meta.xml | 5 ++++ 4 files changed, 36 insertions(+) create mode 100644 force-app/main/default/lwc/firstComponent/__tests__/firstComponent.test.js create mode 100644 force-app/main/default/lwc/firstComponent/firstComponent.html create mode 100644 force-app/main/default/lwc/firstComponent/firstComponent.js create mode 100644 force-app/main/default/lwc/firstComponent/firstComponent.js-meta.xml diff --git a/force-app/main/default/lwc/firstComponent/__tests__/firstComponent.test.js b/force-app/main/default/lwc/firstComponent/__tests__/firstComponent.test.js new file mode 100644 index 0000000..c3bf369 --- /dev/null +++ b/force-app/main/default/lwc/firstComponent/__tests__/firstComponent.test.js @@ -0,0 +1,25 @@ +import { createElement } from 'lwc'; +import FirstComponent from 'c/firstComponent'; + +describe('c-first-component', () => { + afterEach(() => { + // The jsdom instance is shared across test cases in a single file so reset the DOM + while (document.body.firstChild) { + document.body.removeChild(document.body.firstChild); + } + }); + + it('TODO: test case generated by CLI command, please fill in test logic', () => { + // Arrange + const element = createElement('c-first-component', { + is: FirstComponent + }); + + // Act + document.body.appendChild(element); + + // Assert + // const div = element.shadowRoot.querySelector('div'); + expect(1).toBe(1); + }); +}); \ No newline at end of file diff --git a/force-app/main/default/lwc/firstComponent/firstComponent.html b/force-app/main/default/lwc/firstComponent/firstComponent.html new file mode 100644 index 0000000..27e0f69 --- /dev/null +++ b/force-app/main/default/lwc/firstComponent/firstComponent.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/force-app/main/default/lwc/firstComponent/firstComponent.js b/force-app/main/default/lwc/firstComponent/firstComponent.js new file mode 100644 index 0000000..656f990 --- /dev/null +++ b/force-app/main/default/lwc/firstComponent/firstComponent.js @@ -0,0 +1,3 @@ +import { LightningElement } from 'lwc'; + +export default class FirstComponent extends LightningElement {} \ No newline at end of file diff --git a/force-app/main/default/lwc/firstComponent/firstComponent.js-meta.xml b/force-app/main/default/lwc/firstComponent/firstComponent.js-meta.xml new file mode 100644 index 0000000..41719fe --- /dev/null +++ b/force-app/main/default/lwc/firstComponent/firstComponent.js-meta.xml @@ -0,0 +1,5 @@ + + + 63.0 + false + \ No newline at end of file