clarity-pattern-parser 3.0.13 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -251,23 +251,21 @@ describe("TextInspector", () => {
251
251
  expect(inspection.isComplete).toBe(false);
252
252
  });
253
253
 
254
- // This is a current bug. Repeat can end on a divider and that isn't right.
255
-
256
- // test("Suggest another item in the repeat.", () => {
257
- // const a = new Literal("a", "A");
258
- // const b = new Literal("b", "B");
259
- // const space = new Literal("space", " ");
260
- // const or = new OrComposite("names", [a, b]);
254
+ test("Suggest another item in the repeat.", () => {
255
+ const a = new Literal("a", "A");
256
+ const b = new Literal("b", "B");
257
+ const space = new Literal("space", " ");
258
+ const or = new OrComposite("names", [a, b]);
261
259
 
262
- // const repeat = new RepeatComposite("repeat", or, space);
260
+ const repeat = new RepeatComposite("repeat", or, space);
263
261
 
264
- // const result = TextSuggester.suggest("A B ", repeat);
262
+ const result = TextSuggester.suggest("A B ", repeat);
265
263
 
266
- // expect(result.isComplete).toBe(false);
267
- // expect(result.options.values[0]).toBe("A");
268
- // expect(result.options.values[1]).toBe("B");
269
- // expect(result.options.values.length).toBe(2);
270
- // });
264
+ expect(result.isComplete).toBe(false);
265
+ expect(result.options.values[0]).toBe("A");
266
+ expect(result.options.values[1]).toBe("B");
267
+ expect(result.options.values.length).toBe(2);
268
+ });
271
269
 
272
270
  test("Repeating pattern.", () => {
273
271
  const expression = generateExpression(["FlagX", "FlagY", "FlagZ"]);