Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaclyde committed Mar 24, 2024
1 parent 2570f47 commit 45e7441
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
import { describe, it, expect } from 'vitest';
import { createMediaQueries } from '../src/css-media-queries/create-media-queries';
import { breakpoints } from '../src/css-media-queries/breakpoints';
import { cssHovProperties } from '../src/css-media-queries/css-hov-properties';
import { describe, it, expect } from 'vitest'
import { createMediaQueries } from '../src/css-media-queries/create-media-queries'
import { breakpoints } from '../src/css-media-queries/breakpoints'
import { cssHovProperties } from '../src/css-media-queries/css-hov-properties'

describe('Test of the createMediaQueries and cssHovProperties methods', () => {
it('Use the createMediaQueries method without breakpoints', async () => {
const cssProps = {
backgroundColor: 'black',
fontSize: '14px',
color: 'gray',
};
color: 'gray'
}

const cssGenerated = await createMediaQueries(cssProps, breakpoints);
const cssGenerated = await createMediaQueries(cssProps, breakpoints)

expect(cssGenerated).toMatchObject({
'background-color': 'black',
'font-size': '14px',
color: 'gray',
});
});
color: 'gray'
})
})

it('Use the createMediaQueries method with default breakpoints', async () => {
const cssProps = {
backgroundColor: 'black',
fontSize: { base: '12px', md: '14px', lg: '16px' },
color: 'gray',
};
color: 'gray'
}

const cssGenerated = await createMediaQueries(cssProps, breakpoints);
const cssGenerated = await createMediaQueries(cssProps, breakpoints)

expect(cssGenerated).toMatchObject({
'background-color': 'black',
'font-size': '12px',
'@media screen and (min-width: 48em)': { 'font-size': '14px' },
'@media screen and (min-width: 62em)': { 'font-size': '16px' },
color: 'gray',
});
});
color: 'gray'
})
})

it('Use the cssHovProperties method', async () => {
const css = {
_hover: {
backgroundColor: 'black',
color: 'white',
},
};
color: 'white'
}
}

const cssGenerated = cssHovProperties(css);
const cssGenerated = cssHovProperties(css)

expect(cssGenerated).toMatchObject({
'&:hover': { 'background-color': 'black', color: 'white' },
});
});
});
'&:hover': { 'background-color': 'black', color: 'white' }
})
})
})

0 comments on commit 45e7441

Please sign in to comment.