MCPcopy Create free account
hub / github.com/ampproject/amphtml / opt_navigate

Function opt_navigate

test/unit/test-alp-handler.js:179–186  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

177 it('should perform special navigation if specially asked for', () => {
178 const navigateSpy = env.sandbox.spy();
179 const opt_navigate = (val) => {
180 navigateSpy();
181 expect(val).to.equal(
182 'https://cdn.ampproject.org/c/www.example.com/amp.html#click=' +
183 'https%3A%2F%2Ftest.com%3Famp%3D1%26adurl%3Dhttps%253A%252F%252F' +
184 'cdn.ampproject.org%252Fc%252Fwww.example.com%252Famp.html'
185 );
186 };
187 handleClick(event, opt_navigate);
188 expect(event.preventDefault).to.be.calledOnce;
189 expect(open).to.not.be.called;

Callers

nothing calls this directly

Calls 1

expectFunction · 0.85

Tested by

no test coverage detected