mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
prettier + tag fix
This commit is contained in:
@@ -2,9 +2,7 @@ import { expect, fixture, html, elementUpdated } from '@open-wc/testing';
|
||||
import type SlFormatBytes from './format-bytes';
|
||||
|
||||
describe('<sl-format-bytes>', () => {
|
||||
|
||||
describe('defaults ', () => {
|
||||
|
||||
it('default properties', async () => {
|
||||
const el = await fixture<SlFormatBytes>(html` <sl-format-bytes></sl-format-bytes> `);
|
||||
|
||||
@@ -16,36 +14,34 @@ describe('<sl-format-bytes>', () => {
|
||||
});
|
||||
|
||||
describe('bytes', () => {
|
||||
|
||||
const results = [
|
||||
{
|
||||
value: 12,
|
||||
short: '12 byte',
|
||||
long: '12 bytes',
|
||||
narrow: '12B',
|
||||
narrow: '12B'
|
||||
},
|
||||
{
|
||||
value: 1200,
|
||||
short: '1.2 kB',
|
||||
long: '1.2 kilobytes',
|
||||
narrow: '1.2kB',
|
||||
narrow: '1.2kB'
|
||||
},
|
||||
{
|
||||
value: 1200000,
|
||||
short: '1.2 MB',
|
||||
long: '1.2 megabytes',
|
||||
narrow: '1.2MB',
|
||||
narrow: '1.2MB'
|
||||
},
|
||||
{
|
||||
value: 1200000000,
|
||||
short: '1.2 GB',
|
||||
long: '1.2 gigabytes',
|
||||
narrow: '1.2GB',
|
||||
narrow: '1.2GB'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
results.forEach((expected) => {
|
||||
results.forEach(expected => {
|
||||
it('bytes : display formats', async () => {
|
||||
const el = await fixture<SlFormatBytes>(html` <sl-format-bytes></sl-format-bytes> `);
|
||||
// short
|
||||
@@ -66,7 +62,6 @@ describe('<sl-format-bytes>', () => {
|
||||
expect(el.shadowRoot?.textContent).to.equal(expected.narrow);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('bits', () => {
|
||||
@@ -75,30 +70,29 @@ describe('<sl-format-bytes>', () => {
|
||||
value: 12,
|
||||
short: '12 bit',
|
||||
long: '12 bits',
|
||||
narrow: '12bit',
|
||||
narrow: '12bit'
|
||||
},
|
||||
{
|
||||
value: 1200,
|
||||
short: '1.2 kb',
|
||||
long: '1.2 kilobits',
|
||||
narrow: '1.2kb',
|
||||
narrow: '1.2kb'
|
||||
},
|
||||
{
|
||||
value: 1200000,
|
||||
short: '1.2 Mb',
|
||||
long: '1.2 megabits',
|
||||
narrow: '1.2Mb',
|
||||
narrow: '1.2Mb'
|
||||
},
|
||||
{
|
||||
value: 1200000000,
|
||||
short: '1.2 Gb',
|
||||
long: '1.2 gigabits',
|
||||
narrow: '1.2Gb',
|
||||
narrow: '1.2Gb'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
results.forEach((expected) => {
|
||||
results.forEach(expected => {
|
||||
it('bits : display formats', async () => {
|
||||
const el = await fixture<SlFormatBytes>(html` <sl-format-bytes unit="bit"></sl-format-bytes> `);
|
||||
// short
|
||||
@@ -119,7 +113,5 @@ describe('<sl-format-bytes>', () => {
|
||||
expect(el.shadowRoot?.textContent).to.equal(expected.narrow);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user