| 2612 | |
| 2613 | suite('p5.strands error messages', () => { |
| 2614 | const expectLoopProtectionError = run => { |
| 2615 | let err; |
| 2616 | |
| 2617 | try { |
| 2618 | run(); |
| 2619 | } catch (e) { |
| 2620 | err = e; |
| 2621 | } |
| 2622 | |
| 2623 | assert.instanceOf(err, Error); |
| 2624 | assert.include(err.message, 'Loop protection'); |
| 2625 | assert.include(err.message, '// noprotect'); |
| 2626 | }; |
| 2627 | |
| 2628 | afterEach(() => { |
| 2629 | mockUserError.mockClear(); |