How to use the @podium/utils.template function in @podium/utils

To help you get started, we’ve selected a few @podium/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github podium-lib / podlet / __tests__ / podlet.js View on Github external
test('res.podiumSend() - contructor argument "development" is set to "true" - should append default wireframe document', async () => {
    const options = Object.assign({}, DEFAULT_OPTIONS, {
        development: true,
    });
    const podlet = new Podlet(options);
    const server = new FakeExpressServer(podlet, (req, res) => {
        res.podiumSend('<h1>OK!</h1>');
    });

    await server.listen();
    const result = await server.get({ raw: true });

    const incoming = new HttpIncoming(SIMPLE_REQ, SIMPLE_RES);
    expect(result.response).toEqual(template(incoming, '<h1>OK!</h1>'));

    await server.close();
});

@podium/utils

Common generic utility methods shared by @podium modules.

MIT
Latest version published 13 days ago

Package Health Score

78 / 100
Full package analysis