commit
This commit is contained in:
8
force-app/main/default/aura/.eslintrc.json
Normal file
8
force-app/main/default/aura/.eslintrc.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"plugins": ["@salesforce/eslint-plugin-aura"],
|
||||
"extends": ["plugin:@salesforce/eslint-plugin-aura/recommended"],
|
||||
"rules": {
|
||||
"vars-on-top": "off",
|
||||
"no-unused-expressions": "off"
|
||||
}
|
||||
}
|
||||
14
force-app/main/default/lwc/.eslintrc.json
Normal file
14
force-app/main/default/lwc/.eslintrc.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"extends": ["@salesforce/eslint-config-lwc/recommended"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.test.js"],
|
||||
"rules": {
|
||||
"@lwc/lwc/no-unexpected-wire-adapter-usages": "off"
|
||||
},
|
||||
"env": {
|
||||
"node": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
25
force-app/main/default/lwc/testLWC/__tests__/testLWC.test.js
Normal file
25
force-app/main/default/lwc/testLWC/__tests__/testLWC.test.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { createElement } from 'lwc';
|
||||
import TestLWC from 'c/testLWC';
|
||||
|
||||
describe('c-test-lwc', () => {
|
||||
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-test-lwc', {
|
||||
is: TestLWC
|
||||
});
|
||||
|
||||
// Act
|
||||
document.body.appendChild(element);
|
||||
|
||||
// Assert
|
||||
// const div = element.shadowRoot.querySelector('div');
|
||||
expect(1).toBe(1);
|
||||
});
|
||||
});
|
||||
3
force-app/main/default/lwc/testLWC/testLWC.html
Normal file
3
force-app/main/default/lwc/testLWC/testLWC.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
3
force-app/main/default/lwc/testLWC/testLWC.js
Normal file
3
force-app/main/default/lwc/testLWC/testLWC.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import { LightningElement } from 'lwc';
|
||||
|
||||
export default class TestLWC extends LightningElement {}
|
||||
5
force-app/main/default/lwc/testLWC/testLWC.js-meta.xml
Normal file
5
force-app/main/default/lwc/testLWC/testLWC.js-meta.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
|
||||
<apiVersion>63.0</apiVersion>
|
||||
<isExposed>false</isExposed>
|
||||
</LightningComponentBundle>
|
||||
Reference in New Issue
Block a user