From 22f71ba51f4f5b98b9a126f578fd2de445ca0353 Mon Sep 17 00:00:00 2001 From: Rene Saarsoo Date: Sat, 26 Dec 2020 17:50:10 +0200 Subject: [PATCH] Skip uninteresting snapshots --- src/parser/parser.test.ts | 91 ++------------------------------------- 1 file changed, 4 insertions(+), 87 deletions(-) diff --git a/src/parser/parser.test.ts b/src/parser/parser.test.ts index 49ee07b..114fb8f 100644 --- a/src/parser/parser.test.ts +++ b/src/parser/parser.test.ts @@ -712,55 +712,14 @@ Interval: 2:00 90% }); it("triggers no error when comments at least 10 seconds apart", () => { - expect( + expect(() => parse(` Name: My Workout Interval: 2:00 90% @ 0:00 First comment @ 0:10 Second Comment `), - ).toMatchInlineSnapshot(` - Object { - "author": "", - "description": "", - "intervals": Array [ - Object { - "cadence": undefined, - "comments": Array [ - Object { - "loc": Object { - "col": 4, - "row": 3, - }, - "offset": Duration { - "seconds": 0, - }, - "text": "First comment", - }, - Object { - "loc": Object { - "col": 4, - "row": 4, - }, - "offset": Duration { - "seconds": 10, - }, - "text": "Second Comment", - }, - ], - "duration": Duration { - "seconds": 120, - }, - "intensity": ConstantIntensity { - "_value": 0.9, - }, - "type": "Interval", - }, - ], - "name": "My Workout", - "tags": Array [], - } - `); + ).not.toThrowError(); }); it("throws error when comment does not finish before end of interval", () => { @@ -777,55 +736,13 @@ Interval: 1:00 90% }); it("triggers no error when comment finishes right at interval end", () => { - expect( + expect(() => parse(` Name: My Workout Interval: 1:00 80% @ 0:50 First comment Interval: 1:00 90% `), - ).toMatchInlineSnapshot(` - Object { - "author": "", - "description": "", - "intervals": Array [ - Object { - "cadence": undefined, - "comments": Array [ - Object { - "loc": Object { - "col": 4, - "row": 3, - }, - "offset": Duration { - "seconds": 50, - }, - "text": "First comment", - }, - ], - "duration": Duration { - "seconds": 60, - }, - "intensity": ConstantIntensity { - "_value": 0.8, - }, - "type": "Interval", - }, - Object { - "cadence": undefined, - "comments": Array [], - "duration": Duration { - "seconds": 60, - }, - "intensity": ConstantIntensity { - "_value": 0.9, - }, - "type": "Interval", - }, - ], - "name": "My Workout", - "tags": Array [], - } - `); + ).not.toThrowError(); }); });