From 0e7ace7a288a60ca7a52db13b6b133990bf8c9e8 Mon Sep 17 00:00:00 2001 From: Anton Gilgur Date: Tue, 30 Jul 2019 01:22:40 -0400 Subject: [PATCH] (test/refactor): rewrite more to be closer to BDD-style --- src/index.spec.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index.spec.js b/src/index.spec.js index 67c7f2c..2bb58c1 100644 --- a/src/index.spec.js +++ b/src/index.spec.js @@ -12,13 +12,13 @@ test('mounts canvas and instance properly', () => { expect(instance.isEmpty()).toBe(true) }) -describe('props are set and updated correctly', () => { - test('default props should match', () => { +describe('setting and updating props', () => { + it('should set default props', () => { const instance = mount().instance() expect(instance.props).toStrictEqual(SignatureCanvas.defaultProps) }) - test('mounted initial props and options should match', () => { + it('should set initial mount props and SigPad options', () => { const instance = mount().instance() const sigPad = instance.getSignaturePad() @@ -26,7 +26,7 @@ describe('props are set and updated correctly', () => { expect(sigPad).toMatchObject(propsF.sigPadOptions) }) - test('updated props and options should match', () => { + it('should update props and SigPad options', () => { const wrapper = mount() const instance = wrapper.instance() const sigPad = instance.getSignaturePad() @@ -117,7 +117,7 @@ describe('SigCanvas wrapper methods return equivalent to SigPad', () => { }) // comes after props and wrapper methods as it uses both -describe('get methods return correct canvases', () => { +describe('get methods', () => { const instance = mount( ).instance()