Skip to content

Commit 5dc5b2b

Browse files
committed
(test/refactor): rewrite more to be closer to BDD-style
1 parent 36cf0ab commit 5dc5b2b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/index.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ test('mounts canvas and instance properly', () => {
1212
expect(instance.isEmpty()).toBe(true)
1313
})
1414

15-
describe('props are set and updated correctly', () => {
16-
test('default props should match', () => {
15+
describe('setting and updating props', () => {
16+
it('should set default props', () => {
1717
const instance = mount(<SignatureCanvas />).instance()
1818
expect(instance.props).toStrictEqual(SignatureCanvas.defaultProps)
1919
})
2020

21-
test('mounted initial props and options should match', () => {
21+
it('should set initial mount props and SigPad options', () => {
2222
const instance = mount(<SignatureCanvas {...propsF.all} />).instance()
2323
const sigPad = instance.getSignaturePad()
2424

2525
expect(instance.props).toMatchObject(propsF.all)
2626
expect(sigPad).toMatchObject(propsF.sigPadOptions)
2727
})
2828

29-
test('updated props and options should match', () => {
29+
it('should update props and SigPad options', () => {
3030
const wrapper = mount(<SignatureCanvas />)
3131
const instance = wrapper.instance()
3232
const sigPad = instance.getSignaturePad()
@@ -117,7 +117,7 @@ describe('SigCanvas wrapper methods return equivalent to SigPad', () => {
117117
})
118118

119119
// comes after props and wrapper methods as it uses both
120-
describe('get methods return correct canvases', () => {
120+
describe('get methods', () => {
121121
const instance = mount(
122122
<SignatureCanvas canvasProps={dotF.canvasProps} />
123123
).instance()

0 commit comments

Comments
 (0)