Skip to content

Commit

Permalink
Update unit test formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
azurepolarbear committed May 26, 2024
1 parent 621af01 commit 91bbd6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
13 changes: 6 additions & 7 deletions src/test/color/color.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,13 @@ describe('color tests', (): void => {

test.each(
[
{hex: _0437F2.HEX, paletteColor: _0437F2},
{hex: _0FFF4F.HEX, paletteColor: _0FFF4F},
{hex: _7A00F5.HEX, paletteColor: _7A00F5},
{hex: _FF6BB5.HEX, paletteColor: _FF6BB5}
{paletteColor: _0437F2},
{paletteColor: _0FFF4F},
{paletteColor: _7A00F5},
{paletteColor: _FF6BB5}
]
)('$# color built with PaletteColor object: $hex',
({hex, paletteColor}): void => {
expect(hex).toBeTruthy();
)('$# color built with PaletteColor object: $paletteColor.HEX',
({paletteColor}): void => {
const expected: ColorComponents = {
r: paletteColor.RGB.R, g: paletteColor.RGB.G, b: paletteColor.RGB.B, a: 255
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {BRITTNI, MISCELLANEOUS_PALETTES} from 'palettes';
import {checkForPaletteInMap, checkForValidStringMap} from 'unit-test/shared';

describe('miscellaneous palettes map test', (): void => {
const ALL_MISC_PALETTES: [{name: string, palette: Palette}] = [
{name: BRITTNI.NAME, palette: BRITTNI}
const ALL_MISC_PALETTES: {palette: Palette}[] = [
{palette: BRITTNI}
]

test('valid map: MISCELLANEOUS_PALETTES', (): void => {
Expand All @@ -31,9 +31,8 @@ describe('miscellaneous palettes map test', (): void => {

test.each(
ALL_MISC_PALETTES
)('$# palette successfully added to map: $name',
({name, palette}): void => {
expect(name).toBeTruthy();
)('$# palette successfully added to map: $palette.NAME',
({palette}): void => {
checkForPaletteInMap(palette, MISCELLANEOUS_PALETTES);
}
);
Expand Down

0 comments on commit 91bbd6d

Please sign in to comment.