Skip to content

Commit

Permalink
BAU: apply recommended formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hughfdjackson committed Jan 28, 2025
1 parent 9828724 commit 111975e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { RadioButtonAnswer } from '../radio-button/radio-button.js'
/** @import {RadioButtonConfig} from '../radio-button/radio-button.js' */


/**
* export @typedef {'yes' | 'no'} YesNoRadioButtonData
* @typedef {{ yesOrNo: 'yes' | 'no' }} YesNoRadioButtonPayload
*/


export const yesNoRadioButtonFactory = ({ emptyOptionText }) => {
/** @type {RadioButtonConfig} */
const yesNoRadio = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ describe('YesNoRadioButton', () => {
})

it('should have same static config & instance config', () => {
expect(new YesNoRadioButton(payload).config).toEqual(YesNoRadioButton.config)
expect(new YesNoRadioButton(payload).config).toEqual(
YesNoRadioButton.config
)
})

it('should have the right payload key', () => {
Expand All @@ -29,11 +31,7 @@ describe('YesNoRadioButton', () => {

it('should have the expected options to select from', () => {
expect(Object.keys(YesNoRadioButton.config.options)).toHaveLength(2)
expect(YesNoRadioButton.config.options.yes.label).toBe(
'Yes'
)
expect(YesNoRadioButton.config.options.no.label).toBe(
'No'
)
expect(YesNoRadioButton.config.options.yes.label).toBe('Yes')
expect(YesNoRadioButton.config.options.no.label).toBe('No')
})
})

0 comments on commit 111975e

Please sign in to comment.