mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
prettier
This commit is contained in:
@@ -38,8 +38,8 @@ describe('<wa-slider>', () => {
|
||||
const el = await fixture<WaSlider>(html` <wa-slider disabled></wa-slider> `);
|
||||
const input = el.shadowRoot!.querySelector<HTMLElement>("[role='slider']")!;
|
||||
|
||||
expect(el.matches(":disabled")).to.be.true
|
||||
expect(input.getAttribute("aria-disabled")).to.equal("true");
|
||||
expect(el.matches(':disabled')).to.be.true;
|
||||
expect(input.getAttribute('aria-disabled')).to.equal('true');
|
||||
});
|
||||
|
||||
describe('when the value changes', () => {
|
||||
|
||||
@@ -124,7 +124,7 @@ export default class WaSlider extends WebAwesomeFormAssociatedElement {
|
||||
|
||||
@state()
|
||||
set value(val: number | null) {
|
||||
val = Number(val) ?? null
|
||||
val = Number(val) ?? null;
|
||||
|
||||
if (this._value === val) {
|
||||
return;
|
||||
@@ -141,8 +141,8 @@ export default class WaSlider extends WebAwesomeFormAssociatedElement {
|
||||
@property({ type: Number, attribute: 'max-value' }) maxValue = 50;
|
||||
|
||||
/** The default value of the form control. Primarily used for resetting the form control. */
|
||||
@property({ attribute: 'value', reflect: true, type: Number }) defaultValue: number | null = Number(this.getAttribute('value')) || this.minValue;
|
||||
|
||||
@property({ attribute: 'value', reflect: true, type: Number }) defaultValue: number | null =
|
||||
Number(this.getAttribute('value')) || this.minValue;
|
||||
|
||||
/** Converts the slider to a range slider with two thumbs. */
|
||||
@property({ type: Boolean, reflect: true }) range = false;
|
||||
|
||||
@@ -163,7 +163,7 @@ function runAllValidityTests(
|
||||
const control = await createControl();
|
||||
expect(control.getForm()).to.equal(null);
|
||||
// control.setAttribute("form", 'test-form');
|
||||
control.form = "test-form"
|
||||
control.form = 'test-form';
|
||||
await control.updateComplete;
|
||||
expect(control.getForm()).to.equal(form);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user