MCPcopy
hub / github.com/processing/p5.js / expectLoopProtectionError

Function expectLoopProtectionError

test/unit/webgl/p5.Shader.js:2614–2626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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();

Callers 1

p5.Shader.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected